home *** CD-ROM | disk | FTP | other *** search
/ Aminet 4 / Aminet 4 - November 1994.iso / aminet / dev / gcc / gcc260diffs.lha / gnu / src-patches / gcc-2.6-amiga.diffs < prev    next >
Encoding:
Text File  |  1994-07-31  |  86.2 KB  |  2,672 lines

  1. diff -2rcN gcc-2.6.0/Makefile.in gcc-2.6.0-amiga/Makefile.in
  2. *** gcc-2.6.0/Makefile.in    Fri Jul  8 11:06:23 1994
  3. --- gcc-2.6.0-amiga/Makefile.in    Sat Jul  9 00:48:57 1994
  4. ***************
  5. *** 66,74 ****
  6.   SHELL = /bin/sh
  7.   # on sysV, define this as cp.
  8. ! INSTALL = install -c
  9.   # These permit overriding just for certain files.
  10.   INSTALL_PROGRAM = $(INSTALL)
  11.   INSTALL_DATA = $(INSTALL)
  12. ! SYMLINK = ln -s
  13.   MAKEINFO = makeinfo
  14.   TEXI2DVI = texi2dvi
  15. --- 66,77 ----
  16.   SHELL = /bin/sh
  17.   # on sysV, define this as cp.
  18. ! INSTALL = cp
  19.   # These permit overriding just for certain files.
  20.   INSTALL_PROGRAM = $(INSTALL)
  21.   INSTALL_DATA = $(INSTALL)
  22. ! SYMLINK = cp
  23. ! # Some systems don't support hardlinks.  For this case, a simple copy
  24. ! # will achieve the same results for our purposes.
  25. ! HARDLINK = cp
  26.   MAKEINFO = makeinfo
  27.   TEXI2DVI = texi2dvi
  28. ***************
  29. *** 100,104 ****
  30.   
  31.   # Target to use when installing include directory.  Either
  32. ! # install-headers-tar or install-headers-cpio.
  33.   INSTALL_HEADERS_DIR = install-headers-tar
  34.   
  35. --- 103,107 ----
  36.   
  37.   # Target to use when installing include directory.  Either
  38. ! # install-headers-tar install-headers-cpio, or install-headers-cp.
  39.   INSTALL_HEADERS_DIR = install-headers-tar
  40.   
  41. ***************
  42. *** 106,110 ****
  43.   # Usually the one we just built.
  44.   # Don't use this as a dependency--use $(GCC_PASSES) or $(GCC_PARTS).
  45. ! GCC_FOR_TARGET = ./xgcc -B./
  46.   
  47.   # This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET.
  48. --- 109,114 ----
  49.   # Usually the one we just built.
  50.   # Don't use this as a dependency--use $(GCC_PASSES) or $(GCC_PARTS).
  51. ! XGCC = xgcc
  52. ! GCC_FOR_TARGET = ./$(XGCC) -B./
  53.   
  54.   # This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET.
  55. ***************
  56. *** 151,160 ****
  57.   # Common prefix for installation directories.
  58.   # NOTE: This directory must exist when you start installation.
  59. ! prefix = /usr/local
  60.   # Directory in which to put localized header files. On the systems with
  61.   # gcc as the native cc, `local_prefix' may not be `prefix' which is
  62.   # `/usr'.
  63.   # NOTE: local_prefix *should not* default from prefix.
  64. ! local_prefix = /usr/local
  65.   # Directory in which to put host dependent programs and libraries
  66.   exec_prefix = $(prefix)
  67. --- 155,167 ----
  68.   # Common prefix for installation directories.
  69.   # NOTE: This directory must exist when you start installation.
  70. ! prefix = /gnu
  71.   # Directory in which to put localized header files. On the systems with
  72.   # gcc as the native cc, `local_prefix' may not be `prefix' which is
  73.   # `/usr'.
  74. + # Similar considerations apply for toolkits located on non-writable storage,
  75. + # such as CD-ROM, where we need a completely separate place to put local
  76. + # include files.
  77.   # NOTE: local_prefix *should not* default from prefix.
  78. ! local_prefix = /gnu
  79.   # Directory in which to put host dependent programs and libraries
  80.   exec_prefix = $(prefix)
  81. ***************
  82. *** 621,625 ****
  83.   
  84.   # Dump a specs file to make -B./ read these specs over installed ones.
  85. ! specs: xgcc
  86.       $(GCC_FOR_TARGET) -dumpspecs > specs
  87.   
  88. --- 628,632 ----
  89.   
  90.   # Dump a specs file to make -B./ read these specs over installed ones.
  91. ! specs: xgcc xgccv
  92.       $(GCC_FOR_TARGET) -dumpspecs > specs
  93.   
  94. ***************
  95. *** 812,817 ****
  96.   # message from ar, we make sure all files are writable.
  97.       -(cd tmpcopy; chmod +w * > /dev/null 2>&1)
  98. !     (cd tmpcopy; $(AR) x ../$(LIBGCC2))
  99. !     (cd tmpcopy; $(AR) $(AR_FLAGS) ../tmplibgcc.a *.o)
  100.       rm -rf tmpcopy
  101.       -if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc.a; else true; fi
  102. --- 819,825 ----
  103.   # message from ar, we make sure all files are writable.
  104.       -(cd tmpcopy; chmod +w * > /dev/null 2>&1)
  105. ! # The "cd..; wait" makes sure that the lock on tmpcopy has time to disappear.
  106. !     (cd tmpcopy; $(AR) x ../$(LIBGCC2); cd ..; /c/wait 2)
  107. !     (cd tmpcopy; $(AR) $(AR_FLAGS) ../tmplibgcc.a *.o; cd ..; /c/wait 2)
  108.       rm -rf tmpcopy
  109.       -if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc.a; else true; fi
  110. ***************
  111. *** 874,881 ****
  112.       $(MAKE) -f $${srcdir1}/objc/Makefile libobjc.a \
  113.         srcdir=$${srcdir1} tooldir=$(tooldir) AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \
  114. !       GCC_FOR_TARGET="$${thisdir1}/xgcc -B$${thisdir1}/" \
  115.         GCC_CFLAGS="$(GCC_CFLAGS)"
  116.       -rm -f libobjc.a
  117. !     ln objc/libobjc.a . >/dev/null 2>&1 || cp objc/libobjc.a .
  118.       -if $(RANLIB_TEST) ; then $(RANLIB) libobjc.a; else true; fi
  119.   
  120. --- 882,889 ----
  121.       $(MAKE) -f $${srcdir1}/objc/Makefile libobjc.a \
  122.         srcdir=$${srcdir1} tooldir=$(tooldir) AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \
  123. !       GCC_FOR_TARGET="$${thisdir1}/$(XGCC) -B$${thisdir1}/" \
  124.         GCC_CFLAGS="$(GCC_CFLAGS)"
  125.       -rm -f libobjc.a
  126. !     cp objc/libobjc.a . >/dev/null 2>&1 || cp objc/libobjc.a .
  127.       -if $(RANLIB_TEST) ; then $(RANLIB) libobjc.a; else true; fi
  128.   
  129. ***************
  130. *** 887,891 ****
  131.       $(MAKE) -f $$srcdir1/objc/Makefile libobjc.a \
  132.         srcdir=$$srcdir1 tooldir=$(tooldir) AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \
  133. !       GCC_FOR_TARGET="$$thisdir1/xgcc -B$$thisdir1/" \
  134.         GCC_CFLAGS="$(GCC_CFLAGS)"
  135.   
  136. --- 895,899 ----
  137.       $(MAKE) -f $$srcdir1/objc/Makefile libobjc.a \
  138.         srcdir=$$srcdir1 tooldir=$(tooldir) AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \
  139. !       GCC_FOR_TARGET="$$thisdir1/$(XGCC) -B$$thisdir1/" \
  140.         GCC_CFLAGS="$(GCC_CFLAGS)"
  141.   
  142. ***************
  143. *** 938,942 ****
  144.   ld: collect2
  145.       rm -f ld
  146. !     ln collect2 ld
  147.   
  148.   collect2 : collect2.o version.o $(LIBDEPS)
  149. --- 946,950 ----
  150.   ld: collect2
  151.       rm -f ld
  152. !     $(HARDLINK) collect2 ld
  153.   
  154.   collect2 : collect2.o version.o $(LIBDEPS)
  155. ***************
  156. *** 1451,1455 ****
  157.   cpp: cccp
  158.       -rm -f cpp
  159. !     ln cccp cpp
  160.   cccp: cccp.o cexp.o version.o $(LIBDEPS)
  161.       $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o cccp cccp.o cexp.o version.o $(LIBS)
  162. --- 1459,1463 ----
  163.   cpp: cccp
  164.       -rm -f cpp
  165. !     $(HARDLINK) cccp cpp
  166.   cccp: cccp.o cexp.o version.o $(LIBDEPS)
  167.       $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o cccp cccp.o cexp.o version.o $(LIBS)
  168. ***************
  169. *** 1611,1615 ****
  170.       $(MAKE) -f $${srcdir1}/objc/Makefile copy-headers \
  171.       srcdir=$${srcdir1} tooldir=$(tooldir) AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \
  172. !     GCC_FOR_TARGET="$${thisdir1}/xgcc -B$${thisdir1}/" \
  173.       GCC_CFLAGS="$(GCC_CFLAGS)" incinstalldir=$${thisdir1}/include
  174.       touch objc-headers
  175. --- 1619,1623 ----
  176.       $(MAKE) -f $${srcdir1}/objc/Makefile copy-headers \
  177.       srcdir=$${srcdir1} tooldir=$(tooldir) AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \
  178. !     GCC_FOR_TARGET="$${thisdir1}/$(XGCC) -B$${thisdir1}/" \
  179.       GCC_CFLAGS="$(GCC_CFLAGS)" incinstalldir=$${thisdir1}/include
  180.       touch objc-headers
  181. ***************
  182. *** 1786,1789 ****
  183. --- 1794,1798 ----
  184.       -rm -fr stage1 stage2 stage3 stage4
  185.       -rm -f */stage1 */stage2 */stage3 */stage4
  186. +     -rm -f cp-parse.output
  187.       -rm -f objc-parse.output
  188.       -rm -f c-parse.output
  189. ***************
  190. *** 1909,1913 ****
  191.         $(INSTALL_PROGRAM) xgcc $(bindir)/gcc; \
  192.         rm -f $(bindir)/$(target)-gcc-1; \
  193. !       ln $(bindir)/gcc $(bindir)/$(target)-gcc-1; \
  194.         mv $(bindir)/$(target)-gcc-1 $(bindir)/$(target)-gcc; \
  195.       fi
  196. --- 1918,1922 ----
  197.         $(INSTALL_PROGRAM) xgcc $(bindir)/gcc; \
  198.         rm -f $(bindir)/$(target)-gcc-1; \
  199. !       $(HARDLINK) $(bindir)/gcc $(bindir)/$(target)-gcc-1; \
  200.         mv $(bindir)/$(target)-gcc-1 $(bindir)/$(target)-gcc; \
  201.       fi
  202. ***************
  203. *** 1985,1989 ****
  204.           if expr "$$dest" : "$$dir.*" > /dev/null; then \
  205.             rm -f $(libsubdir)/include/$$i; \
  206. !           ln -s `echo $$i | sed "s|/[^/]*|/..|g" | sed 's|/..$$||'``echo "$$dest" | sed "s|$$dir||"` $(libsubdir)/include/$$i; \
  207.           fi; \
  208.         done; \
  209. --- 1994,1998 ----
  210.           if expr "$$dest" : "$$dir.*" > /dev/null; then \
  211.             rm -f $(libsubdir)/include/$$i; \
  212. !           $(HARDLINK) -s `echo $$i | sed "s|/[^/]*|/..|g" | sed 's|/..$$||'``echo "$$dest" | sed "s|$$dir||"` $(libsubdir)/include/$$i; \
  213.           fi; \
  214.         done; \
  215. ***************
  216. *** 2008,2011 ****
  217. --- 2017,2024 ----
  218.       (cd include; find . -print) | (cd include; cpio -pdum $(libsubdir)/include)
  219.   
  220. + # Install the include directory using simple recursive copy.
  221. + install-headers-cp: stmp-headers install-include-dir
  222. +     cd include; cp -r . $(libsubdir)/include
  223.   # Put assert.h where it won't override GNU libc's assert.h.
  224.   # It goes in a dir that is searched after GNU libc's headers;
  225. ***************
  226. *** 2096,2100 ****
  227.       mkdir tmp/objc
  228.       for file in *[0-9a-zA-Z+]; do \
  229. !       ln $$file tmp > /dev/null 2>&1 || cp $$file tmp; \
  230.       done
  231.       cd config; \
  232. --- 2109,2113 ----
  233.       mkdir tmp/objc
  234.       for file in *[0-9a-zA-Z+]; do \
  235. !       $(HARDLINK) $$file tmp > /dev/null 2>&1 || cp $$file tmp; \
  236.       done
  237.       cd config; \
  238. ***************
  239. *** 2104,2113 ****
  240.           cd $$file; \
  241.           for subfile in *[0-9a-zA-Z+]; do \
  242. !           ln $$subfile ../../tmp/config/$$file >/dev/null 2>&1 \
  243.             || cp $$subfile ../../tmp/config/$$file; \
  244.           done; \
  245.           cd ..; \
  246.         else \
  247. !         ln $$file ../tmp/config >/dev/null 2>&1 \
  248.           || cp $$file ../tmp/config; \
  249.         fi; \
  250. --- 2117,2126 ----
  251.           cd $$file; \
  252.           for subfile in *[0-9a-zA-Z+]; do \
  253. !           $(HARDLINK) $$subfile ../../tmp/config/$$file >/dev/null 2>&1 \
  254.             || cp $$subfile ../../tmp/config/$$file; \
  255.           done; \
  256.           cd ..; \
  257.         else \
  258. !         $(HARDLINK) $$file ../tmp/config >/dev/null 2>&1 \
  259.           || cp $$file ../tmp/config; \
  260.         fi; \
  261. ***************
  262. *** 2115,2121 ****
  263.       cd objc; \
  264.       for file in *[0-9a-zA-Z+]; do \
  265. !       ln $$file ../tmp/objc >/dev/null 2>&1 || cp $$file ../tmp/objc; \
  266.       done
  267. !     ln .gdbinit tmp
  268.   
  269.   # Finish making `distdir', after the languages have done their thing.
  270. --- 2128,2134 ----
  271.       cd objc; \
  272.       for file in *[0-9a-zA-Z+]; do \
  273. !       $(HARDLINK) $$file ../tmp/objc >/dev/null 2>&1 || cp $$file ../tmp/objc; \
  274.       done
  275. !     $(HARDLINK) .gdbinit tmp
  276.   
  277.   # Finish making `distdir', after the languages have done their thing.
  278. ***************
  279. *** 2143,2157 ****
  280.   # THIS IS OBSOLETE; use the -srcdir operand in configure instead. 
  281.   maketest:
  282. !     ln -s $(DIR)/*.[chy] .
  283. !     ln -s $(DIR)/configure .
  284. !     ln -s $(DIR)/*.def .
  285.       -rm -f =*
  286. !     ln -s $(DIR)/.gdbinit .
  287. !     ln -s $(DIR)/$(FIXINCLUDES) .
  288. !     -ln -s $(DIR)/bison.simple .
  289. !     ln -s $(DIR)/config .
  290. !     ln -s $(DIR)/move-if-change .
  291.   # The then and else were swapped to avoid a problem on Ultrix.
  292. !     if [ ! -f Makefile ] ; then ln -s $(DIR)/Makefile .; else false; fi
  293.       -rm tm.h aux-output.c config.h md
  294.       make clean
  295. --- 2156,2170 ----
  296.   # THIS IS OBSOLETE; use the -srcdir operand in configure instead. 
  297.   maketest:
  298. !     $(SYMLINK) $(DIR)/*.[chy] .
  299. !     $(SYMLINK) $(DIR)/configure .
  300. !     $(SYMLINK) $(DIR)/*.def .
  301.       -rm -f =*
  302. !     $(SYMLINK) $(DIR)/.gdbinit .
  303. !     $(SYMLINK) $(DIR)/$(FIXINCLUDES) .
  304. !     -$(SYMLINK) $(DIR)/bison.simple .
  305. !     $(SYMLINK) $(DIR)/config .
  306. !     $(SYMLINK) $(DIR)/move-if-change .
  307.   # The then and else were swapped to avoid a problem on Ultrix.
  308. !     if [ ! -f Makefile ] ; then $(SYMLINK) $(DIR)/Makefile .; else false; fi
  309.       -rm tm.h aux-output.c config.h md
  310.       make clean
  311. ***************
  312. *** 2169,2183 ****
  313.   # because alloca.o is newer, we permit these recursive makes to compile
  314.   # alloca.o.  Then cc1 is newer, so it won't have to be relinked.
  315. !     $(MAKE) CC="stage1/xgcc -Bstage1/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)"
  316.       $(MAKE) stage2
  317. !     $(MAKE) CC="stage2/xgcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)"
  318.   
  319.   bootstrap2: force
  320. !     $(MAKE) CC="stage1/xgcc -Bstage1/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)"
  321.       $(MAKE) stage2
  322. !     $(MAKE) CC="stage2/xgcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)"
  323.   
  324.   bootstrap3: force
  325. !     $(MAKE) CC="stage2/xgcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)"
  326.   
  327.   # Compare the object files in the current directory with those in the
  328. --- 2182,2196 ----
  329.   # because alloca.o is newer, we permit these recursive makes to compile
  330.   # alloca.o.  Then cc1 is newer, so it won't have to be relinked.
  331. !     $(MAKE) CC="stage1/$(XGCC) -Bstage1/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)"
  332.       $(MAKE) stage2
  333. !     $(MAKE) CC="stage2/$(XGCC) -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)"
  334.   
  335.   bootstrap2: force
  336. !     $(MAKE) CC="stage1/$(XGCC) -Bstage1/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)"
  337.       $(MAKE) stage2
  338. !     $(MAKE) CC="stage2/$(XGCC) -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)"
  339.   
  340.   bootstrap3: force
  341. !     $(MAKE) CC="stage2/$(XGCC) -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)"
  342.   
  343.   # Compare the object files in the current directory with those in the
  344. diff -2rcN gcc-2.6.0/calls.c gcc-2.6.0-amiga/calls.c
  345. *** gcc-2.6.0/calls.c    Thu Jun 16 14:56:29 1994
  346. --- gcc-2.6.0-amiga/calls.c    Fri Jun 17 01:56:27 1994
  347. ***************
  348. *** 2153,2156 ****
  349. --- 2153,2164 ----
  350.     argvec = (struct arg *) alloca (nargs * sizeof (struct arg));
  351.   
  352. + #if defined (__amigados__)
  353. + /* how would you do this RIGHT ?? fake a DECL node? dunno... */
  354. + #ifdef ENCODE_SECTION_INFO
  355. +   /* mark it as a function (to be in the text section that is) */
  356. +   SYMBOL_REF_FLAG (fun) = 1;
  357. + #endif
  358. + #endif
  359.     INIT_CUMULATIVE_ARGS (args_so_far, NULL_TREE, fun);
  360.   
  361. diff -2rcN gcc-2.6.0/cccp.c gcc-2.6.0-amiga/cccp.c
  362. *** gcc-2.6.0/cccp.c    Thu Jun 30 11:33:05 1994
  363. --- gcc-2.6.0-amiga/cccp.c    Fri Jul  1 00:48:14 1994
  364. ***************
  365. *** 40,43 ****
  366. --- 40,59 ----
  367.   #endif /* not EMACS */
  368.   
  369. + #ifdef amigados
  370. + /* Since cpp uses alloca to store all its read files, this is quite deadly
  371. +    on a system with non-automatic stackgrowth like amigados, so we better
  372. +    turn it off now.  Normally alloca is #defined to __builtin_alloca, so
  373. +    undefining it causes an external alloca to be used.
  374. +    Note that it's not wise to generally inhibit __builtin_alloca, since
  375. +    using the generic emulator entitels a serious (!) speed penalty, and
  376. +    it's bad enough that we have to live with it in cccp, don't make cc1
  377. +    unbearably slow as well... */
  378. + #undef alloca
  379. + static int amigados_abs_filename ();
  380. + #endif
  381.   #ifndef STANDARD_INCLUDE_DIR
  382.   #define STANDARD_INCLUDE_DIR "/usr/include"
  383. ***************
  384. *** 1959,1967 ****
  385.   
  386.         /* Discard all directory prefixes from filename.  */
  387.         if ((q = rindex (in_fname, '/')) != NULL)
  388.       ++q;
  389.         else
  390.       q = in_fname;
  391.         /* Copy remainder to mungable area.  */
  392.         p = (char *) alloca (strlen(q) + 8);
  393. --- 1975,1986 ----
  394.   
  395.         /* Discard all directory prefixes from filename.  */
  396. + #ifdef FILE_NAME_NONDIRECTORY
  397. +       q = FILE_NAME_NONDIRECTORY (in_fname);
  398. + #else
  399.         if ((q = rindex (in_fname, '/')) != NULL)
  400.       ++q;
  401.         else
  402.       q = in_fname;
  403. ! #endif
  404.         /* Copy remainder to mungable area.  */
  405.         p = (char *) alloca (strlen(q) + 8);
  406. ***************
  407. *** 3731,3735 ****
  408. --- 3750,3759 ----
  409.         if (!no_output && already_output == 0
  410.         && (kt->pass_thru
  411. + /* Phil.B 27-Mar-93 not quiet sure to keep this old fix */      
  412. + #ifdef maybe_amigados
  413. +           || ((kt->type == T_DEFINE || kt->type == T_UNDEF)
  414. + #else
  415.             || (kt->type == T_DEFINE
  416. + #endif /* amigados */
  417.             && (dump_macros == dump_names
  418.                 || dump_macros == dump_definitions)))) {
  419. ***************
  420. *** 4072,4075 ****
  421. --- 4096,4111 ----
  422.   #ifndef VMS
  423.           ep = rindex (nam, '/');
  424. + #ifdef amigados
  425. +         /* amigados uses unix-style directory-filename separation, but
  426. +            has VMS-style logicals as well */
  427. +         if (ep == NULL) 
  428. +           {
  429. +         ep = rindex (nam, ':');
  430. +         /* a ':' is part of the directory name, a '/' isn't ! */
  431. +             if (ep != NULL) ep++;
  432. +           }
  433. + #endif /* amigados */
  434.   #else                /* VMS */
  435.           ep = rindex (nam, ']');
  436. ***************
  437. *** 4173,4177 ****
  438. --- 4209,4217 ----
  439.     /* If specified file name is absolute, just open it.  */
  440.   
  441. + #ifndef amigados
  442.     if (*fbeg == '/') {
  443. + #else
  444. +   if (amigados_abs_filename (fbeg, flen)) {
  445. + #endif
  446.       strncpy (fname, fbeg, flen);
  447.       fname[flen] = 0;
  448. ***************
  449. *** 4196,4199 ****
  450. --- 4236,4243 ----
  451.         continue;
  452.       strcpy (fname, searchptr->fname);
  453. + #ifdef amigados
  454. +     if (fname[strlen (fname) - 1] != ':')
  455. + #endif
  456.       strcat (fname, "/");
  457.       fname[strlen (fname) + flen] = 0;
  458. ***************
  459. *** 9392,9398 ****
  460.        char *name;
  461.   {
  462.     fprintf (stderr, "%s: ", progname);
  463. !   if (errno < sys_nerr)
  464. !     fprintf (stderr, "%s: %s\n", name, sys_errlist[errno]);
  465.     else
  466.       fprintf (stderr, "%s: undocumented I/O error\n", name);
  467. --- 9436,9444 ----
  468.        char *name;
  469.   {
  470. +   int error = errno;
  471.     fprintf (stderr, "%s: ", progname);
  472. !   if (error < sys_nerr)
  473. !     fprintf (stderr, "%s: %s\n", name, sys_errlist[error]);
  474.     else
  475.       fprintf (stderr, "%s: undocumented I/O error\n", name);
  476. ***************
  477. *** 9803,9804 ****
  478. --- 9849,9874 ----
  479.   }
  480.   #endif /* VMS */
  481. + #ifdef amigados
  482. + /* This function returns whether the LEN characters long filename FNAME 
  483. +    is an absolute path specification. */
  484. + static int
  485. + amigados_abs_filename (fname, len)
  486. +      char *fname;
  487. +      int len;
  488. + {
  489. +   /* we're using ixemul.library, which treats `/foo' as `foo:', so 
  490. +      fname[0] is to be considered absolute as well */
  491. +   if (fname[0] == '/')
  492. +     return 1;
  493. +   /* else do an index() on fname, but one which is limited to len characters */
  494. +   while (*fname && *fname != ':' && len) 
  495. +     fname++, len--;
  496. +   return *fname == ':';
  497. + }
  498. + #endif /* amigados */
  499. diff -2rcN gcc-2.6.0/config/m68k/amigados.c gcc-2.6.0-amiga/config/m68k/amigados.c
  500. *** gcc-2.6.0/config/m68k/amigados.c
  501. --- gcc-2.6.0-amiga/config/m68k/amigados.c    Sun May  8 14:10:18 1994
  502. ***************
  503. *** 0 ****
  504. --- 1,158 ----
  505. + /* Definitions of target machine for GNU compiler.  amiga 68000/68020 version.
  506. +    Copyright (C) 1992 Free Software Foundation, Inc.
  507. +    Contributed by Markus M. Wild (wild@amiga.physik.unizh.ch).
  508. + This file is part of GNU CC.
  509. + GNU CC is free software; you can redistribute it and/or modify
  510. + it under the terms of the GNU General Public License as published by
  511. + the Free Software Foundation; either version 2, or (at your option)
  512. + any later version.
  513. + GNU CC is distributed in the hope that it will be useful,
  514. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  515. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  516. + GNU General Public License for more details.
  517. + You should have received a copy of the GNU General Public License
  518. + along with GNU CC; see the file COPYING.  If not, write to
  519. + the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  520. + #include "m68k/m68k.c"
  521. + /* Does operand (which is a symbolic_operand) live in text space? If
  522. +    so SYMBOL_REF_FLAG, which is set by ENCODE_SECTION_INFO, will be true.
  523. +    This function is used in base relative code generation. */
  524. + int
  525. + read_only_operand (operand)
  526. +      rtx operand;
  527. + {
  528. +   if (GET_CODE (operand) == CONST)
  529. +     operand = XEXP (XEXP (operand, 0), 0);
  530. +   if (GET_CODE (operand) == SYMBOL_REF)
  531. +     return SYMBOL_REF_FLAG (operand) || CONSTANT_POOL_ADDRESS_P (operand);
  532. +   return 1;
  533. + }
  534. + /* the rest of the file is to implement AmigaDOS specific keywords some day.
  535. +    The approach used so far used __attribute__ for this, but this required
  536. +    changes to c-parse.y as well as if we'd use the common keywords used
  537. +    on commercial AmigaDOS C-compilers as well. So in the future I'll probably
  538. +    switch to __saveds and __interrupt keywords as well.
  539. +    The rest of this file is currently ignored, because it's no longer
  540. +    working with the current gcc version. */
  541. + #if not_yet_working
  542. + #include "tree.h"
  543. + struct attribute {
  544. +   tree ident;
  545. +   int  saveds : 1,
  546. +        interrupt : 1;
  547. + };
  548. + static struct attribute *a_tab = 0;
  549. + static int a_index, a_size;
  550. + void
  551. + add_attr_entry (attr)
  552. +     struct attribute *attr;
  553. + {
  554. +   if (! a_tab)
  555. +     {
  556. +       a_size = 10;
  557. +       a_index = 0;
  558. +       a_tab  = (struct attribute *) xmalloc (a_size * sizeof (struct attribute));
  559. +     }
  560. +   if (a_index == a_size)
  561. +     {
  562. +       a_size <<= 1;
  563. +       a_tab = (struct attribute *) xrealloc (a_tab, a_size * sizeof (struct attribute));
  564. +     }
  565. +   a_tab[a_index++] = *attr;
  566. + }
  567. + void
  568. + attr_do_saveds (function_ident)
  569. +       tree function_ident;
  570. + {
  571. +   struct attribute attr, *a;
  572. +   int i;
  573. +   for (i = 0, a = a_tab; i < a_index; i++, a++)
  574. +     if (a->ident == function_ident)
  575. +       {
  576. +     a->saveds = 1;
  577. +     return;
  578. +       }
  579. +   /* create a new entry for this function */
  580. +   attr.ident     = function_ident;
  581. +   attr.saveds    = 1;
  582. +   attr.interrupt = 0;
  583. +   add_attr_entry (&attr);
  584. + }
  585. + void
  586. + attr_do_interrupt (function_ident)
  587. +     tree function_ident;
  588. + {
  589. +   struct attribute attr, *a;
  590. +   int i;
  591. +   for (i = 0, a = a_tab; i < a_index; i++, a++)
  592. +     if (a->ident == function_ident)
  593. +       {
  594. +     /* __interrupt implies __saveds */
  595. +     a->saveds    = 1;
  596. +     a->interrupt = 1;
  597. +     return;
  598. +       }
  599. +   /* create a new entry for this function */
  600. +   attr.ident     = function_ident;
  601. +   attr.saveds     = 1;
  602. +   attr.interrupt = 1;
  603. +   add_attr_entry (&attr);
  604. + }
  605. + int
  606. + attr_does_saveds (function_name)
  607. +     char *function_name;
  608. + {
  609. +   tree ident = get_identifier (function_name);
  610. +   struct attribute *attr;
  611. +   int i;
  612. +   
  613. +   for (i = 0, attr = a_tab; i < a_index; i++, attr++)
  614. +     if (attr->ident == ident)
  615. +       return attr->saveds;
  616. +   return 0;
  617. + }
  618. + int
  619. + attr_does_interrupt (function_name)
  620. +     char *function_name;
  621. + {
  622. +   tree ident = get_identifier (function_name);
  623. +   struct attribute *attr;
  624. +   int i;
  625. +   
  626. +   for (i = 0, attr = a_tab; i < a_index; i++, attr++)
  627. +     if (attr->ident == ident)
  628. +       return attr->interrupt;
  629. +   return 0;
  630. + }
  631. + #endif
  632. diff -2rcN gcc-2.6.0/config/m68k/amigados.h gcc-2.6.0-amiga/config/m68k/amigados.h
  633. *** gcc-2.6.0/config/m68k/amigados.h
  634. --- gcc-2.6.0-amiga/config/m68k/amigados.h    Wed Jul  6 01:46:10 1994
  635. ***************
  636. *** 0 ****
  637. --- 1,419 ----
  638. + /* Definitions of target machine for GNU compiler.  amiga 68000/68020 version.
  639. +    Copyright (C) 1992 Free Software Foundation, Inc.
  640. +    Contributed by Markus M. Wild (wild@amiga.physik.unizh.ch).
  641. + This file is part of GNU CC.
  642. + GNU CC is free software; you can redistribute it and/or modify
  643. + it under the terms of the GNU General Public License as published by
  644. + the Free Software Foundation; either version 2, or (at your option)
  645. + any later version.
  646. + GNU CC is distributed in the hope that it will be useful,
  647. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  648. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  649. + GNU General Public License for more details.
  650. + You should have received a copy of the GNU General Public License
  651. + along with GNU CC; see the file COPYING.  If not, write to
  652. + the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  653. + #include "m68k/m68k.h"
  654. + /* See m68k.h for bits in TARGET_DEFAULT.
  655. +    0 means 68000, no hardware fpu (68881/68882/68040).
  656. +    7 means 68020 (or higher) with hardware fpu.  */
  657. + #ifndef TARGET_DEFAULT
  658. + #define TARGET_DEFAULT 0
  659. + #endif
  660. + /* Define __HAVE_68881__ in preprocessor according to the -m flags.
  661. +    This will control the use of inline 68881 insns in certain macros.
  662. +    Also inform the program which CPU this is for.  */
  663. + #if TARGET_DEFAULT & 02
  664. + /* -m68881 is the default */
  665. + #define CPP_SPEC \
  666. + "%{!msoft-float:-D__HAVE_68881__ }\
  667. + %{!ansi:%{m68000:-Dmc68010}%{mc68000:-Dmc68010}%{m68030:-Dmc68030}%{mc68030:-Dmc68030}%{m68040:-Dmc68040}\
  668. + %{mc68040:-Dmc68040}%{!mc68000:%{!m68000:-Dmc68020}}}"
  669. + #else
  670. + /* -msoft-float is the default, assume -mc68000 as well */
  671. + #define CPP_SPEC \
  672. + "%{m68881:-D__HAVE_68881__ }\
  673. + %{!ansi:%{m68020:-Dmc68020}%{mc68020:-Dmc68020}%{m68030:-Dmc68030}%{mc68030:-Dmc68030}%{m68040:-Dmc68040}\
  674. + %{mc68040:-Dmc68040}%{!mc68020:%{!m68020:%{!mc68030:%{!m68030:%{!mc68040:%{!m68040:-Dmc68010}}}}}}}"
  675. + /* Don't try using XFmode since we don't have appropriate runtime software
  676. +    support.  */
  677. + #undef LONG_DOUBLE_TYPE_SIZE
  678. + #define LONG_DOUBLE_TYPE_SIZE 64
  679. + #endif
  680. + /* -m68000 requires special flags to the assembler.  */
  681. + #if TARGET_DEFAULT & 01
  682. + #define ASM_SPEC \
  683. +  "%{m68000:-mc68010}%{mc68000:-mc68010}%{mc68030:-mc68030}%{m68030:-mc68030}%{mc68040:-mc68040}%{m68040:-mc68040}\
  684. + %{!mc68000:%{!m68000:%{!mc68030:%{!m68030:%{!mc68040:%{!m68040:-mc68020}}}}}} %{msmall-code:-l} "
  685. + #else
  686. + #define ASM_SPEC \
  687. +  "%{m68020:-mc68020}%{mc68020:-mc68020}%{mc68030:-mc68030}%{m68030:-mc68030}%{mc68040:-mc68040}\
  688. + %{m68040:-mc68040}%{!mc68020:%{!m68020:%{!mc68030:%{!m68030:%{!mc68040:%{!m68040:-mc68010}}}}}} %{msmall-code:-l} "
  689. + #endif
  690. + /* amiga/amigados are the new "standard" defines for the Amiga, MCH_AMIGA
  691. +  * was used before and is included for compatibility reasons */
  692. + #define CPP_PREDEFINES "-Dmc68000 -Damiga -Damigados -DMCH_AMIGA -DAMIGA"
  693. + /* Choose the right startup file, depending on whether we use base relative
  694. +    code, base relative code with automatic relocation (-resident), or plain
  695. +    crt0.o. 
  696. +   
  697. +    Profiling is currently only available for plain startup.
  698. +    mcrt0.o does not (yet) exist. */
  699. + #define STARTFILE_SPEC \
  700. +   "%{!noixemul:%{resident:rcrt0.o%s}%{!resident:%{!fbaserel:%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}}\
  701. + %{fbaserel:%{pg:bgcrt0.o%s}%{!pg:%{p:bmcrt0.o%s}%{!p:bcrt0.o%s}}}}}\
  702. + %{noixemul:%{resident:/gnu/lib/libnix/nrcrt0.o%s}%{!resident:%{fbaserel:/gnu/lib/libnix/nbcrt0.o%s}\
  703. + %{!fbaserel:/gnu/lib/libnix/ncrt0.o%s}}}"
  704. + #define ENDFILE_SPEC "%{noixemul:-lstubs}"
  705. + /* Automatically search libamiga.a for AmigaDOS specific functions.  Note
  706. +    that we first search the standard C library to resolve as much as
  707. +    possible from there, since it has names that are duplicated in libamiga.a
  708. +    which we *don't* want from there.  Then search the standard C library
  709. +    again to resolve any references that libamiga.a might have generated.
  710. +    This may only be a temporary solution since it might be better to simply
  711. +    remove the things from libamiga.a that should be pulled in from libc.a
  712. +    instead, which would eliminate the first reference to libc.a. */
  713. + #define LIB_SPEC "%{!noixemul:%{!p:%{!pg:-lc -lamiga -lc}}%{p:-lc_p -lamiga -lc_p}%{pg:-lc_p -lamiga -lc_p}}%{noixemul:-lnixmain -lnix -lamiga}"
  714. + /* if debugging, tell the linker to output amiga-hunk symbols *and* a BSD
  715. +    compatible debug hunk (which will probably change in the future, it's not
  716. +    tremendously useful in its current state). */
  717. + #define LINK_SPEC "%{!noixemul: %{m68020:-fl libm020} %{m68030:-fl libm020} %{m68040:-fl libm020} %{g:-amiga-debug-hunk} \
  718. + %{fbaserel:-databss-together} %{resident:-databss-together -datadata-reloc -fl libb}}\
  719. + %{noixemul: -fl libnix %{m68020:-fl libm020} %{m68030:-fl libm020} %{m68040:-fl libm020} %{g:-amiga-debug-hunk} \
  720. + %{resident:-databss-together -datadata-reloc -fl libb }\
  721. + %{!resident:%{fbaserel:-databss-together -fl libb }}}"
  722. + #define CC1_SPEC "%{m68040:-mbitfield}%{mc68040:-mbitfield}%{resident:-fbaserel} "
  723. + #define CC1PLUS_SPEC "%{m68040:-mbitfield}%{mc68040:-mbitfield}%{resident:-fbaserel} "
  724. + /* Omit frame pointer at high optimization levels. (This doesn't hurt, since
  725. +    GDB doesn't work under AmigaDOS at the moment anyway..) */
  726. +   
  727. + #define OPTIMIZATION_OPTIONS(OPTIMIZE) \
  728. + {                                  \
  729. +   if (OPTIMIZE >= 2)                         \
  730. +     flag_omit_frame_pointer = 1;                \
  731. + }
  732. + /* provide a dummy entry for the small-code switch. This is currently only
  733. +    needed by the assembler (explanations: m68k.h), but will be used by cc1
  734. +    to output 16bit pc-relative code later. */
  735. + #undef TARGET_SWITCHES
  736. + #define TARGET_SWITCHES  \
  737. +   { { "68020", 5},                \
  738. +     { "c68020", 5},                \
  739. +     { "68881", 2},                \
  740. +     { "bitfield", 4},                \
  741. +     { "68000", -5},                \
  742. +     { "c68000", -5},                \
  743. +     { "soft-float", -0102},            \
  744. +     { "nobitfield", -4},            \
  745. +     { "rtd", 8},                \
  746. +     { "nortd", -8},                \
  747. +     { "short", 040},                \
  748. +     { "noshort", -040},                \
  749. +     { "fpa", 0100},                \
  750. +     { "nofpa", -0100},                \
  751. +     { "sky", 0200},                \
  752. +     { "nosky", -0200},                \
  753. +     { "68040", 0407},                \
  754. +     { "68030", -01400},                \
  755. +     { "68030", 7},                \
  756. +     { "68040-only", 01000},            \
  757. +     { "small-code", 0 },            \
  758. +     { "", TARGET_DEFAULT}}
  759. + /* Every structure or union's size must be a multiple of 2 bytes.  */
  760. + #define STRUCTURE_SIZE_BOUNDARY 16
  761. + /* This is (almost;-)) BSD, so it wants DBX format.  */
  762. + #define DBX_DEBUGGING_INFO
  763. + /* Allow folding division by zero.  */
  764. + #define REAL_INFINITY
  765. + #if 0    /* This apparently is no longer necessary? */
  766. + /* This is how to output an assembler line defining a `double' constant.  */
  767. + #undef ASM_OUTPUT_DOUBLE
  768. + #define ASM_OUTPUT_DOUBLE(FILE,VALUE)                    \
  769. +   {                                    \
  770. +     if (REAL_VALUE_ISINF (VALUE))                    \
  771. +       fprintf (FILE, "\t.double 0r%s99e999\n", (VALUE) > 0 ? "" : "-");    \
  772. +     else if (isnan (VALUE))                        \
  773. +       {                                    \
  774. +     union { double d; long l[2];} t;                \
  775. +     t.d = (VALUE);                            \
  776. +     fprintf (FILE, "\t.long 0x%lx\n\t.long 0x%lx\n", t.l[0], t.l[1]); \
  777. +       }                                    \
  778. +     else                                \
  779. +       fprintf (FILE, "\t.double 0r%.17g\n", VALUE);            \
  780. +   }
  781. + /* This is how to output an assembler line defining a `float' constant.  */
  782. + #undef ASM_OUTPUT_FLOAT
  783. + #define ASM_OUTPUT_FLOAT(FILE,VALUE)                    \
  784. +   {                                    \
  785. +     if (REAL_VALUE_ISINF (VALUE))                    \
  786. +       fprintf (FILE, "\t.single 0r%s99e999\n", (VALUE) > 0 ? "" : "-");    \
  787. +     else if (isnan (VALUE))                        \
  788. +       {                                    \
  789. +     union { float f; long l;} t;                    \
  790. +     t.f = (VALUE);                            \
  791. +     fprintf (FILE, "\t.long 0x%lx\n", t.l);                \
  792. +       }                                    \
  793. +     else                                \
  794. +       fprintf (FILE, "\t.single 0r%.9g\n", VALUE);            \
  795. +   }
  796. + /* This is how to output an assembler lines defining floating operands.
  797. +    There's no way to output a NaN's fraction, so we lose it.  */
  798. +   
  799. + #undef ASM_OUTPUT_FLOAT_OPERAND
  800. + #define ASM_OUTPUT_FLOAT_OPERAND(CODE,FILE,VALUE)                \
  801. +  do {                                \
  802. +       if (CODE == 'f')                        \
  803. +         {                            \
  804. +           (REAL_VALUE_ISINF ((VALUE))                        \
  805. +            ? asm_fprintf (FILE, "%I0r%s99e999", ((VALUE) > 0 ? "" : "-")) \
  806. +            : (VALUE) == -0.0                            \
  807. +            ? asm_fprintf (FILE, "%I0r-0.0")                    \
  808. +            : asm_fprintf (FILE, "%I0r%.9g", (VALUE))) \
  809. +         } else {                                        \
  810. +           long l;                        \
  811. +           REAL_VALUE_TO_TARGET_SINGLE (VALUE, l);        \
  812. +           if (sizeof (int) == sizeof (long))            \
  813. +             asm_fprintf ((FILE), "%I0x%x", l);            \
  814. +           else                            \
  815. +             asm_fprintf ((FILE), "%I0x%lx", l);            \
  816. +         }                            \
  817. +      } while (0)
  818. + #undef ASM_OUTPUT_DOUBLE_OPERAND
  819. + #define ASM_OUTPUT_DOUBLE_OPERAND(FILE,VALUE)                \
  820. +   (REAL_VALUE_ISINF ((VALUE))                        \
  821. +    ? asm_fprintf (FILE, "%I0r%s99e999", ((VALUE) > 0 ? "" : "-")) \
  822. +    : (VALUE) == -0.0                            \
  823. +    ? asm_fprintf (FILE, "%I0r-0.0")                    \
  824. +    : asm_fprintf (FILE, "%I0r%.17g", (VALUE)))
  825. + #endif    /* 0 */
  826. + /* use A5 as framepointer instead of A6, this makes A6 available as a
  827. +    general purpose register, and can thus be used without problems in
  828. +    direct library calls. */
  829. + #undef FRAME_POINTER_REGNUM
  830. + #define FRAME_POINTER_REGNUM 13
  831. + #undef ARG_POINTER_REGNUM
  832. + #define ARG_POINTER_REGNUM 13
  833. + /* we use A4 for this, not A5, which is the framepointer */
  834. + #undef PIC_OFFSET_TABLE_REGNUM
  835. + #define PIC_OFFSET_TABLE_REGNUM 12
  836. + /* setup a default shell return value for those (gazillion..) programs that
  837. +    (inspite of ANSI-C) declare main() to be void (or even VOID...) and thus
  838. +    cause the shell to randomly caugh upon executing such programs (contrary
  839. +    to Unix, AmigaDOS scripts are terminated with an error if a program returns
  840. +    with an error code above the `error' or even `failure' level
  841. +    (which is configurable with the FAILAT command) */
  842. + #define DEFAULT_MAIN_RETURN c_expand_return (integer_zero_node)
  843. + /* we do have an ansi-compliant c-library ;-) */
  844. + #define HAVE_VPRINTF
  845. + #define HAVE_VFPRINTF
  846. + #define HAVE_PUTENV
  847. + #define HAVE_STRERROR
  848. + #define HAVE_ATEXIT
  849. + /* given that symbolic_operand(X), return TRUE if no special
  850. +    base relative relocation is necessary */
  851. + #define LEGITIMATE_BASEREL_OPERAND_P(X) \
  852. +   (flag_pic >= 3 && read_only_operand (X))
  853. + #undef LEGITIMATE_PIC_OPERAND_P
  854. + #define LEGITIMATE_PIC_OPERAND_P(X) \
  855. +   (! symbolic_operand (X, VOIDmode) || LEGITIMATE_BASEREL_OPERAND_P (X))
  856. + /* Define this macro if references to a symbol must be treated
  857. +    differently depending on something about the variable or
  858. +    function named by the symbol (such as what section it is in).
  859. +    The macro definition, if any, is executed immediately after the
  860. +    rtl for DECL or other node is created.
  861. +    The value of the rtl will be a `mem' whose address is a
  862. +    `symbol_ref'.
  863. +    The usual thing for this macro to do is to a flag in the
  864. +    `symbol_ref' (such as `SYMBOL_REF_FLAG') or to store a modified
  865. +    name string in the `symbol_ref' (if one bit is not enough
  866. +    information).
  867. +    On the Amiga we use this to indicate if a symbol is in text or
  868. +    data space.  */
  869. + #define ENCODE_SECTION_INFO(DECL)\
  870. + do                                    \
  871. +   {                                    \
  872. +     if (TREE_CODE (DECL) == FUNCTION_DECL)                \
  873. +       SYMBOL_REF_FLAG (XEXP (DECL_RTL (DECL), 0)) = 1;            \
  874. +     else                                \
  875. +       {                                    \
  876. +     rtx rtl = (TREE_CODE_CLASS (TREE_CODE (DECL)) != 'd'        \
  877. +            ? TREE_CST_RTL (DECL) : DECL_RTL (DECL));        \
  878. +     if (RTX_UNCHANGING_P (rtl) && !MEM_VOLATILE_P (rtl))        \
  879. +       SYMBOL_REF_FLAG (XEXP (rtl, 0)) = 1;                \
  880. +       }                                    \
  881. +   }                                    \
  882. + while (0)
  883. + #undef SELECT_RTX_SECTION
  884. + #define SELECT_RTX_SECTION(MODE, X) readonly_data_section ();
  885. + /* according to varasm.c, RELOC referrs *only* to whether constants (!)
  886. +    are addressed by address. This doesn't matter in baserelative code,
  887. +    so we allow (inspite of flag_pic) readonly_data_section() in that
  888. +    case */
  889. + #undef SELECT_SECTION
  890. + #define SELECT_SECTION(DECL, RELOC)                    \
  891. + {                                    \
  892. +   if (TREE_CODE (DECL) == STRING_CST)                    \
  893. +     {                                    \
  894. +       if (! flag_writable_strings)                    \
  895. +     readonly_data_section ();                    \
  896. +       else                                \
  897. +     data_section ();                        \
  898. +     }                                    \
  899. +   else if (TREE_CODE (DECL) == VAR_DECL)                \
  900. +     {                                    \
  901. +       if ((flag_pic && flag_pic < 3 && RELOC)                \
  902. +       || !TREE_READONLY (DECL) || TREE_SIDE_EFFECTS (DECL))        \
  903. +     data_section ();                        \
  904. +       else                                \
  905. +     readonly_data_section ();                    \
  906. +     }                                    \
  907. +   else                                    \
  908. +     readonly_data_section ();                        \
  909. + }
  910. + #if not_yet_working
  911. + /* starting support for amiga specific keywords
  912. +  * --------------------------------------------
  913. +  */
  914. + /* validate attributes that don't take a parameter. Currently we support
  915. +  * __attribute__ (saveds) and __attribute__ (interrupt)
  916. +  */
  917. + #define HANDLE_ATTRIBUTE0(attr) \
  918. +   (strcmp(attr, "saveds") != 0 && strcmp(attr, "interrupt") != 0)
  919. + /* (c-common.c)
  920. +  * install additional attributes
  921. +  */
  922. + #define HANDLE_EXTRA_ATTRIBUTES(a)                         \
  923. +   if (TREE_VALUE (a) != 0                            \
  924. +       && TREE_CODE (TREE_VALUE (a)) == IDENTIFIER_NODE                \
  925. +       && TREE_VALUE (a) == get_identifier ("saveds"))                \
  926. +     {                                        \
  927. +       if (TREE_CODE (decl) != FUNCTION_DECL)                    \
  928. +         {                                    \
  929. +           warning_with_decl (decl,                        \
  930. +               "saveds attribute specified for non-function `%s'");        \
  931. +       return;                                \
  932. +         }                                    \
  933. +                                               \
  934. +       attr_do_saveds (DECL_NAME (decl));                    \
  935. +     }                                        \
  936. +   else if (TREE_VALUE (a) != 0                            \
  937. +       && TREE_CODE (TREE_VALUE (a)) == IDENTIFIER_NODE                \
  938. +       && TREE_VALUE (a) == get_identifier ("interrupt"))            \
  939. +     {                                        \
  940. +       if (TREE_CODE (decl) != FUNCTION_DECL)                    \
  941. +         {                                    \
  942. +           warning_with_decl (decl,                        \
  943. +               "saveds attribute specified for non-function `%s'");        \
  944. +       return;                                \
  945. +         }                                    \
  946. +                                               \
  947. +       attr_do_interrupt (DECL_NAME (decl));                    \
  948. +     }                                        \
  949. + #define PROLOGUE_EXTRA_SAVE(mask)                        \
  950. +   { extern char *current_function_name;                        \
  951. +     /* saveds makes the function preserve d1/a0/a1 as well */            \
  952. +     if (attr_does_saveds (current_function_name))                \
  953. +       mask |= 0x40c0; }                                \
  954. + #define EPILOGUE_EXTRA_RESTORE(mask, nregs)                    \
  955. +   { extern char *current_function_name;                        \
  956. +     /* restore those extra registers */                        \
  957. +     if (attr_does_saveds (current_function_name))                \
  958. +       {                                        \
  959. +     mask |= 0x0302;                                \
  960. +     nregs += 3;                                \
  961. +       } }                                    \
  962. + #define EPILOGUE_EXTRA_BARRIER_KLUDGE(stream)                    \
  963. +   { extern char *current_function_name;                        \
  964. +     /* PLEASE Help! how is this done cleaner?? */                \
  965. +     if (attr_does_saveds (current_function_name))                \
  966. +       {                                        \
  967. +     fprintf (stderr,                             \
  968. +          "warning: couldn't cleanup `saveds'-stack in `%s'.\n");    \
  969. +     fprintf (stderr,                            \
  970. +          "         this is only ok, if the function never returns!\n");    \
  971. +       }    }                                    \
  972. +         
  973. + #define EPILOGUE_EXTRA_TEST(stream)                        \
  974. +   { extern char *current_function_name;                        \
  975. +     /* with the interrupt-attribute, we have to set the cc before rts */    \
  976. +     if (attr_does_interrupt (current_function_name))                \
  977. +       asm_fprintf (stream, "\ttstl %s\n", reg_names[0]); }            \
  978. + #endif
  979. diff -2rcN gcc-2.6.0/config/m68k/m68k.c gcc-2.6.0-amiga/config/m68k/m68k.c
  980. *** gcc-2.6.0/config/m68k/m68k.c    Sun Apr 17 00:16:27 1994
  981. --- gcc-2.6.0-amiga/config/m68k/m68k.c    Sun May  8 14:10:23 1994
  982. ***************
  983. *** 62,66 ****
  984.   finalize_pic ()
  985.   {
  986. !   if (flag_pic && current_function_uses_pic_offset_table)
  987.       emit_insn (gen_rtx (USE, VOIDmode, pic_offset_table_rtx));
  988.   }
  989. --- 62,66 ----
  990.   finalize_pic ()
  991.   {
  992. !   if (flag_pic && (flag_pic < 3) && current_function_uses_pic_offset_table)
  993.       emit_insn (gen_rtx (USE, VOIDmode, pic_offset_table_rtx));
  994.   }
  995. ***************
  996. *** 142,146 ****
  997.       {
  998.         /* Adding negative number is faster on the 68040.  */
  999. !       if (fsize + 4 < 0x8000)
  1000.       {
  1001.       /* asm_fprintf() cannot handle %. */
  1002. --- 142,147 ----
  1003.       {
  1004.         /* Adding negative number is faster on the 68040.  */
  1005. !         if (fsize + 4 < 0x8000)
  1006.       {
  1007.       /* asm_fprintf() cannot handle %. */
  1008. ***************
  1009. *** 197,200 ****
  1010. --- 198,204 ----
  1011.         num_saved_regs--;
  1012.       }
  1013. + #ifdef PROLOGUE_EXTRA_SAVE
  1014. +   PROLOGUE_EXTRA_SAVE (mask);
  1015. + #endif
  1016.   
  1017.   #if NEED_PROBE
  1018. ***************
  1019. *** 230,234 ****
  1020.   #endif
  1021.       }
  1022. !   if (flag_pic && current_function_uses_pic_offset_table)
  1023.       {
  1024.   #ifdef MOTOROLA
  1025. --- 234,238 ----
  1026.   #endif
  1027.       }
  1028. !   if (flag_pic && (flag_pic < 3) && current_function_uses_pic_offset_table)
  1029.       {
  1030.   #ifdef MOTOROLA
  1031. ***************
  1032. *** 295,298 ****
  1033. --- 299,305 ----
  1034.        about which function the pc is in at this address.  */
  1035.         asm_fprintf (stream, "\tnop\n");
  1036. + #ifdef EPILOGUE_EXTRA_BARRIER_KLUDGE
  1037. +       EPILOGUE_EXTRA_BARRIER_KLUDGE(stream);
  1038. + #endif
  1039.         return;
  1040.       }
  1041. ***************
  1042. *** 325,328 ****
  1043. --- 332,338 ----
  1044.       mask |= 1 << regno;
  1045.         }
  1046. + #ifdef EPILOGUE_EXTRA_RESTORE
  1047. +   EPILOGUE_EXTRA_RESTORE(mask, nregs);
  1048. + #endif
  1049.     offset = foffset + nregs * 4;
  1050.     if (offset + fsize >= 0x8000
  1051. ***************
  1052. *** 529,532 ****
  1053. --- 539,545 ----
  1054.       }
  1055.       }
  1056. + #ifdef EPILOGUE_EXTRA_TEST
  1057. +   EPILOGUE_EXTRA_TEST(stream);
  1058. + #endif
  1059.     if (current_function_pops_args)
  1060.       asm_fprintf (stream, "\trtd %0I%d\n", current_function_pops_args);
  1061. ***************
  1062. *** 819,831 ****
  1063.     if (GET_CODE (orig) == SYMBOL_REF || GET_CODE (orig) == LABEL_REF)
  1064.       {
  1065.         if (reg == 0)
  1066.       abort ();
  1067.   
  1068. !       pic_ref = gen_rtx (MEM, Pmode,
  1069. !              gen_rtx (PLUS, Pmode,
  1070. !                   pic_offset_table_rtx, orig));
  1071.         current_function_uses_pic_offset_table = 1;
  1072.         RTX_UNCHANGING_P (pic_ref) = 1;
  1073.         emit_move_insn (reg, pic_ref);
  1074.         return reg;
  1075.       }
  1076. --- 832,854 ----
  1077.     if (GET_CODE (orig) == SYMBOL_REF || GET_CODE (orig) == LABEL_REF)
  1078.       {
  1079. + #ifdef LEGITIMATE_BASEREL_OPERAND_P
  1080. +   if (LEGITIMATE_BASEREL_OPERAND_P (orig))
  1081. +     return orig;
  1082. + #endif
  1083.         if (reg == 0)
  1084.       abort ();
  1085.   
  1086. !       if (flag_pic >= 3)
  1087. !     pic_ref = gen_rtx (PLUS, Pmode, pic_offset_table_rtx, orig);
  1088. !       else
  1089. !         pic_ref = gen_rtx (MEM, Pmode,
  1090. !                gen_rtx (PLUS, Pmode,
  1091. !                     pic_offset_table_rtx, orig));
  1092.         current_function_uses_pic_offset_table = 1;
  1093.         RTX_UNCHANGING_P (pic_ref) = 1;
  1094.         emit_move_insn (reg, pic_ref);
  1095.         return reg;
  1096.       }
  1097. ***************
  1098. *** 856,859 ****
  1099. --- 879,883 ----
  1100.         /* Likewise, should we set special REG_NOTEs here?  */
  1101.       }
  1102.     return pic_ref;
  1103.   }
  1104. ***************
  1105. *** 2168,2171 ****
  1106. --- 2192,2199 ----
  1107.               if ((flag_pic == 2) && (breg == pic_offset_table_rtx))
  1108.                 fprintf (file, ":l");
  1109. +             if ((flag_pic == 3) && (breg == pic_offset_table_rtx))
  1110. +               fprintf (file, ":W");
  1111. +             if ((flag_pic == 4) && (breg == pic_offset_table_rtx))
  1112. +               fprintf (file, ":L");
  1113.             }
  1114.           if (addr != 0 && ireg != 0)
  1115. diff -2rcN gcc-2.6.0/config/m68k/m68k.h gcc-2.6.0-amiga/config/m68k/m68k.h
  1116. *** gcc-2.6.0/config/m68k/m68k.h    Sun Apr 10 12:10:37 1994
  1117. --- gcc-2.6.0-amiga/config/m68k/m68k.h    Sun May  8 14:10:26 1994
  1118. ***************
  1119. *** 354,360 ****
  1120.   
  1121.   #define CONDITIONAL_REGISTER_USAGE \
  1122. ! {                                               \
  1123. !   if (flag_pic)                                 \
  1124. !     fixed_regs[PIC_OFFSET_TABLE_REGNUM] = 1;    \
  1125.   }
  1126.   
  1127. --- 354,363 ----
  1128.   
  1129.   #define CONDITIONAL_REGISTER_USAGE \
  1130. ! {                                                \
  1131. !   if (flag_pic)                                  \
  1132. !     fixed_regs[PIC_OFFSET_TABLE_REGNUM] = 1;     \
  1133. !   /* prevent saving/restoring of the base reg */ \
  1134. !   if (flag_pic == 3)                 \
  1135. !     call_used_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \
  1136.   }
  1137.   
  1138. diff -2rcN gcc-2.6.0/config/m68k/m68k.md gcc-2.6.0-amiga/config/m68k/m68k.md
  1139. *** gcc-2.6.0/config/m68k/m68k.md    Thu Jul  7 10:12:04 1994
  1140. --- gcc-2.6.0-amiga/config/m68k/m68k.md    Tue Jul  5 23:30:57 1994
  1141. ***************
  1142. *** 713,723 ****
  1143.     if (flag_pic && symbolic_operand (operands[1], SImode)) 
  1144.       {
  1145. !       /* The source is an address which requires PIC relocation.  
  1146. !          Call legitimize_pic_address with the source, mode, and a relocation
  1147. !          register (a new pseudo, or the final destination if reload_in_progress
  1148. !          is set).   Then fall through normally */
  1149. !       extern rtx legitimize_pic_address();
  1150. !       rtx temp = reload_in_progress ? operands[0] : gen_reg_rtx (Pmode);
  1151. !       operands[1] = legitimize_pic_address (operands[1], SImode, temp);
  1152.       }
  1153.   }")
  1154. --- 713,728 ----
  1155.     if (flag_pic && symbolic_operand (operands[1], SImode)) 
  1156.       {
  1157. ! #ifdef LEGITIMATE_BASEREL_OPERAND_P
  1158. !       if (flag_pic < 3 || !LEGITIMATE_BASEREL_OPERAND_P (operands[1]))
  1159. ! #endif
  1160. !       {
  1161. !         /* The source is an address which requires PIC relocation.  
  1162. !            Call legitimize_pic_address with the source, mode, and a relocation
  1163. !            register (a new pseudo, or the final destination if reload_in_progress
  1164. !            is set).   Then fall through normally */
  1165. !         extern rtx legitimize_pic_address();
  1166. !         rtx temp = reload_in_progress ? operands[0] : gen_reg_rtx (Pmode);
  1167. !         operands[1] = legitimize_pic_address (operands[1], SImode, temp);
  1168. !       }
  1169.       }
  1170.   }")
  1171. ***************
  1172. *** 1857,1862 ****
  1173.         /* These insns can result from reloads to access
  1174.        stack slots over 64k from the frame pointer.  */
  1175. !       if (GET_CODE (operands[2]) == CONST_INT
  1176. !       && INTVAL (operands[2]) + 0x8000 >= (unsigned) 0x10000)
  1177.           return \"move%.l %2,%0\;add%.l %1,%0\";
  1178.   #ifdef SGS
  1179. --- 1862,1868 ----
  1180.         /* These insns can result from reloads to access
  1181.        stack slots over 64k from the frame pointer.  */
  1182. !       if (((GET_CODE (operands[2]) == CONST_INT
  1183. !        && INTVAL (operands[2]) + 0x8000 >= (unsigned) 0x10000))
  1184. !       || (flag_pic == 4 && operands[1] == pic_offset_table_rtx))
  1185.           return \"move%.l %2,%0\;add%.l %1,%0\";
  1186.   #ifdef SGS
  1187. ***************
  1188. *** 4766,4770 ****
  1189.     "
  1190.   {
  1191. !   if (flag_pic && GET_CODE (XEXP (operands[0], 0)) == SYMBOL_REF)
  1192.   #ifdef MOTOROLA
  1193.       SYMBOL_REF_FLAG (XEXP (operands[0], 0)) = 1;
  1194. --- 4772,4776 ----
  1195.     "
  1196.   {
  1197. !   if (flag_pic && flag_pic < 3 && GET_CODE (XEXP (operands[0], 0)) == SYMBOL_REF)
  1198.   #ifdef MOTOROLA
  1199.       SYMBOL_REF_FLAG (XEXP (operands[0], 0)) = 1;
  1200. ***************
  1201. *** 4781,4785 ****
  1202.     ;; Operand 1 not really used on the m68000.
  1203.   
  1204. !   "! flag_pic"
  1205.     "*
  1206.   #ifdef MOTOROLA
  1207. --- 4787,4791 ----
  1208.     ;; Operand 1 not really used on the m68000.
  1209.   
  1210. !   "(! flag_pic || flag_pic >= 3)"
  1211.     "*
  1212.   #ifdef MOTOROLA
  1213. ***************
  1214. *** 4801,4805 ****
  1215.     ;; Operand 1 not really used on the m68000.
  1216.   
  1217. !   "flag_pic"
  1218.     "*
  1219.   #ifdef MOTOROLA
  1220. --- 4807,4811 ----
  1221.     ;; Operand 1 not really used on the m68000.
  1222.   
  1223. !   "(flag_pic && flag_pic < 3)"
  1224.     "*
  1225.   #ifdef MOTOROLA
  1226. ***************
  1227. *** 4826,4830 ****
  1228.     "
  1229.   {
  1230. !   if (flag_pic && GET_CODE (XEXP (operands[1], 0)) == SYMBOL_REF)
  1231.   #ifdef MOTOROLA
  1232.       SYMBOL_REF_FLAG (XEXP (operands[1], 0)) = 1;
  1233. --- 4832,4836 ----
  1234.     "
  1235.   {
  1236. !   if (flag_pic && flag_pic < 3 && GET_CODE (XEXP (operands[1], 0)) == SYMBOL_REF)
  1237.   #ifdef MOTOROLA
  1238.       SYMBOL_REF_FLAG (XEXP (operands[1], 0)) = 1;
  1239. ***************
  1240. *** 4841,4845 ****
  1241.             (match_operand:SI 2 "general_operand" "g")))]
  1242.     ;; Operand 2 not really used on the m68000.
  1243. !   "! flag_pic"
  1244.     "*
  1245.   #ifdef MOTOROLA
  1246. --- 4847,4851 ----
  1247.             (match_operand:SI 2 "general_operand" "g")))]
  1248.     ;; Operand 2 not really used on the m68000.
  1249. !   "(! flag_pic || flag_pic >= 3)"
  1250.     "*
  1251.   #ifdef MOTOROLA
  1252. ***************
  1253. *** 4861,4865 ****
  1254.             (match_operand:SI 2 "general_operand" "g")))]
  1255.     ;; Operand 2 not really used on the m68000.
  1256. !   "flag_pic"
  1257.     "*
  1258.   #ifdef MOTOROLA
  1259. --- 4867,4871 ----
  1260.             (match_operand:SI 2 "general_operand" "g")))]
  1261.     ;; Operand 2 not really used on the m68000.
  1262. !   "(flag_pic && flag_pic < 3)"
  1263.     "*
  1264.   #ifdef MOTOROLA
  1265. diff -2rcN gcc-2.6.0/config/m68k/t-amigados gcc-2.6.0-amiga/config/m68k/t-amigados
  1266. *** gcc-2.6.0/config/m68k/t-amigados
  1267. --- gcc-2.6.0-amiga/config/m68k/t-amigados    Sun May 29 13:27:34 1994
  1268. ***************
  1269. *** 0 ****
  1270. --- 1,187 ----
  1271. + # Makefile fragment for amigados target.
  1272. + # We generate two additional things:
  1273. + #
  1274. + # libb/libgcc.a
  1275. + #    A base relative version of libgcc.a which is used when compiling and
  1276. + #    linking with the '-resident' option.
  1277. + #
  1278. + # xgccv
  1279. + #    A forking gcc instead of one calling ssytem(). This makes it less
  1280. + #    system conformant (can't ^C it when started from make), while providing
  1281. + #    increased functionality (-pipe option).
  1282. + # Use the vfork'ing version of gcc by default, so that the -pipe option can
  1283. + # get tested.  To use the regular version just do "make XGCC=gcc".  Note that
  1284. + # PIPE is defined in x-amigados, so if we are doing a native build, it will
  1285. + # be defined.  It can be overridden with "make PIPE=".
  1286. + XGCC = xgccv $(PIPE)
  1287. + GCC_FOR_TARGET = ./$(XGCC) -B./
  1288. + # Build residentable versions of the gcc executables by default.  Use
  1289. + # "make RESIDENT=" to build non-residentable versions.
  1290. + # Note:  This failed during bootstrapping of 2.5.5.
  1291. + #RESIDENT = -resident
  1292. + # The standard additional target flags for the compiler.
  1293. + T_CFLAGS = $(RESIDENT)
  1294. + # Allow the user to override the default target optimizations with gcc, or if
  1295. + # the target compiler is not gcc and doesn't understand -O<N>.
  1296. + T_OPTIMISE = -O2
  1297. + # Each compilation environment (Manx, Dice, GCC, SAS/C, etc) provides its
  1298. + # own equivalent of the UNIX /usr/include tree.  For gcc, the standard headers
  1299. + # are in /gnu/include and system specific headers are in /gnu/os-include.
  1300. + # Use these paths for fixincludes.
  1301. + SYSTEM_HEADER_DIR = /gnu/include
  1302. + OTHER_FIXINCLUDES_DIRS = /gnu/os-include
  1303. + # We don't need a libgcc1, it's all in ixemul.library
  1304. + LIBGCC1 = libgcc1.null
  1305. + # Flags to use when compiling the normal version of libgcc.a.
  1306. + # Don't compile with debugging, as long as there is no debugger.
  1307. + # Explicitly leave out the -resident compilation flag and don't use T_CFLAGS.
  1308. + LIBGCC2_CFLAGS = $(T_OPTIMIZE) $(INTERNAL_CFLAGS) $(X_CFLAGS) $(CFLAGS) \
  1309. +           $(CROSS_GCC_CFLAGS)
  1310. + # Flags to use when compiling the base relative version of libgcc.a.
  1311. + # Don't compile with debugging, as long as there is no debugger.
  1312. + # Explicitly force -resident in the compilation flags and don't use T_CFLAGS.
  1313. + LIBBGCC2_CFLAGS = $(T_OPTIMIZE) $(INTERNAL_CFLAGS) $(X_CFLAGS) $(CFLAGS) \
  1314. +           $(CROSS_GCC_CFLAGS) -resident
  1315. + # Build the base relative library.
  1316. + # It is later copied into /gnu/lib/gcc-lib/amigados/<version>/libb/libgcc.a, whereas
  1317. + # libgcc.a is copied into /gnu/lib/gcc-lib/amigados/<version>/libgcc.a.
  1318. + # It doesn't work very well to define one of the EXTRA_* macros to contain
  1319. + # libb/libgcc.a, particularly for doing "make stageN" or "make install".
  1320. + GCC_PARTS=$(GCC_PASSES) libgcc.a libb/libgcc.a $(EXTRA_PROGRAMS) $(USE_COLLECT2) $(EXTRA_PARTS)
  1321. + # Add install_libbgcc to normal define of INSTALL_LIBGCC.  Let install-gccv
  1322. + # hitch a ride on here as well.
  1323. + INSTALL_LIBGCC = install-libgcc install-libbgcc install-gccv
  1324. + # This includes the knowledge that target amigados doesn't need libgcc1.a
  1325. + libb/libgcc.a: libgcc1.null libgcc2.c libgcc2.ready $(CONFIG_H) \
  1326. +    $(LIB2FUNCS_EXTRA) machmode.h longlong.h gbl-ctors.h config.status
  1327. + # Actually build it in tmplibbgcc.a, then rename at end,
  1328. + # so that libb/libgcc.a itself remains nonexistent if compilation is aborted.
  1329. +     -rm -f tmplibbgcc.a
  1330. + # -e causes any failing command to make this rule fail.
  1331. + # -e doesn't work in certain shells, so we test $$? as well.
  1332. +     set -e; \
  1333. +     for name in $(LIB2FUNCS); \
  1334. +     do \
  1335. +       echo $${name}; \
  1336. +       $(GCC_FOR_TARGET) $(LIBBGCC2_CFLAGS) $(INCLUDES) -c -DL$${name} \
  1337. +           $(srcdir)/libgcc2.c -o $${name}.o; \
  1338. +       if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
  1339. +       $(AR) $(AR_FLAGS) tmplibbgcc.a $${name}.o; \
  1340. +       rm -f $${name}.o; \
  1341. +     done
  1342. + # Some shells crash when a loop has no items.
  1343. + # So make sure there is always at least one--`..'.
  1344. + # Then ignore it.
  1345. + # We don't use -e here because there are if statements
  1346. + # that should not make the command give up when the if condition is false.
  1347. + # Instead, we test for failure after each command where it matters.
  1348. +     -for file in .. $(LIB2FUNCS_EXTRA); \
  1349. +     do \
  1350. +       if [ x$${file} != x.. ]; then \
  1351. +         name=`echo $${file} | sed -e 's/[.]c$$//' -e 's/[.]asm$$//'`; \
  1352. +         echo $${name}; \
  1353. +         if [ $${name}.asm = $${file} ]; then \
  1354. +           cp $${file} $${name}.s || exit 1; file=$${name}.s; \
  1355. +         else true; fi; \
  1356. +         $(GCC_FOR_TARGET) $(LIBBGCC2_CFLAGS) $(INCLUDES) -c $${file}; \
  1357. +         if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
  1358. +         $(AR) $(AR_FLAGS) tmplibbgcc.a $${name}.o; \
  1359. +         rm -f $${name}.[so]; \
  1360. +       else true; \
  1361. +       fi; \
  1362. +     done
  1363. +     -if $(RANLIB_TEST) ; then $(RANLIB) tmplibbgcc.a; else true; fi
  1364. +     -if [ -d libb ] ; then true ; else mkdir libb ; fi
  1365. +     mv tmplibbgcc.a libb/libgcc.a
  1366. + install-libbgcc: libb/libgcc.a install-dir
  1367. +     -if [ -d $(libsubdir)/libb ] ; then true ; else mkdir $(libsubdir)/libb ; fi
  1368. +     -if [ -f libb/libgcc.a ] ; then \
  1369. +       rm -f $(libsubdir)/libb/libgcc.a; \
  1370. +       $(INSTALL_DATA) libb/libgcc.a $(libsubdir)/libb/libgcc.a; \
  1371. +       if $(RANLIB_TEST) ; then \
  1372. +         (cd $(libsubdir)/libb; $(RANLIB) libgcc.a); else true; fi; \
  1373. +       chmod a-x $(libsubdir)/libb/libgcc.a; \
  1374. +     else true; fi
  1375. +     
  1376. + # The default gcc (xgcc) is built without -DAMIGADOS_FORK_GCC. This gcc (xgccv)
  1377. + # is built with AMIGADOS_FORK_GCC defined, so that it can use '-pipe'.  We
  1378. + # don't want to define EXTRA_PASSES to xgccv because that will cause xgccv
  1379. + # to be installed in $(libsubdir), so instead we use the default GCC_PASSES
  1380. + # and add xgccv to it.
  1381. + GCC_PASSES = xgcc xgccv cc1 cpp $(EXTRA_PASSES)
  1382. + xgccv: xgccv.o version.o $(LIBDEPS)
  1383. +     $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o xgccv xgccv.o version.o $(LIBS)
  1384. + xgccv.o: gcc.c $(CONFIG_H) config.status
  1385. +     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
  1386. +   -DSTANDARD_STARTFILE_PREFIX=\"$(libdir)/\" \
  1387. +   -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc-lib/\" \
  1388. +   -DDEFAULT_TARGET_VERSION=\"$(version)\" \
  1389. +   -DDEFAULT_TARGET_MACHINE=\"$(target)\" \
  1390. +   -DTOOLDIR_BASE_PREFIX=\"$(exec_prefix)/\" \
  1391. +   -DAMIGADOS_FORK_GCC \
  1392. +   -c `echo $(srcdir)/gcc.c | sed 's,^\./,,'` -o xgccv.o
  1393. + install-gccv: xgccv
  1394. +     rm -f $(bindir)/gccv
  1395. +     $(INSTALL_PROGRAM) xgccv $(bindir)/gccv
  1396. + # When making one of the stage<N> dirs, we need to make a libb subdir for
  1397. + # it, and copy libbgcc.a there as libgcc.a.
  1398. + EXTRA_STAGE1_TARGETS = stage1-libb
  1399. + EXTRA_STAGE2_TARGETS = stage2-libb
  1400. + EXTRA_STAGE3_TARGETS = stage3-libb
  1401. + EXTRA_STAGE4_TARGETS = stage4-libb
  1402. + stage1-libb:
  1403. +     -if [ -d stage1 ] ; then true ; else mkdir stage1 ; fi
  1404. +     -if [ -d stage1/libb ] ; then true ; else mkdir stage1/libb ; fi
  1405. +     -cp libb/libgcc.a stage1/libb/libgcc.a
  1406. +     -if $(RANLIB_TEST) ; then $(RANLIB) stage1/libb/libgcc.a; else true; fi
  1407. + stage2-libb:
  1408. +     -if [ -d stage2 ] ; then true ; else mkdir stage2 ; fi
  1409. +     -if [ -d stage2/libb ] ; then true ; else mkdir stage2/libb ; fi
  1410. +     -cp libb/libgcc.a stage2/libb/libgcc.a
  1411. +     -if $(RANLIB_TEST) ; then $(RANLIB) stage2/libb/libgcc.a; else true; fi
  1412. + stage3-libb:
  1413. +     -if [ -d stage3 ] ; then true ; else mkdir stage3 ; fi
  1414. +     -if [ -d stage3/libb ] ; then true ; else mkdir stage3/libb ; fi
  1415. +     -cp libb/libgcc.a stage3/libb/libgcc.a
  1416. +     -if $(RANLIB_TEST) ; then $(RANLIB) stage3/libb/libgcc.a; else true; fi
  1417. + stage4-libb:
  1418. +     -if [ -d stage4 ] ; then true ; else mkdir stage4 ; fi
  1419. +     -if [ -d stage4/libb ] ; then true ; else mkdir stage4/libb ; fi
  1420. +     -cp libb/libgcc.a stage4/libb/libgcc.a
  1421. +     -if $(RANLIB_TEST) ; then $(RANLIB) stage4/libb/libgcc.a; else true; fi
  1422. diff -2rcN gcc-2.6.0/config/m68k/x-amigados gcc-2.6.0-amiga/config/m68k/x-amigados
  1423. *** gcc-2.6.0/config/m68k/x-amigados
  1424. --- gcc-2.6.0-amiga/config/m68k/x-amigados    Sun May  8 14:10:35 1994
  1425. ***************
  1426. *** 0 ****
  1427. --- 1,44 ----
  1428. + # Note: It doesn't do any good to try to define prefix or local_prefix
  1429. + # in the host overrides because configure will just change them back.
  1430. + # You either have to give an appropriate option to configure or live with
  1431. + # an Amiga specific patch to configure.  See the note in configure.  -fnf
  1432. + # Building under amigados almost certainly requires an already working gcc.
  1433. + # Use gccv, which is a gcc compiled with AMIGADOS_FORK_GCC so "-pipe" will
  1434. + # work and get exercised.  To bootstrap with the regular gcc just do
  1435. + # "make CC=gcc".  To bootstrap without "-pipe" do "make PIPE=".
  1436. + CC = gccv $(PIPE)
  1437. + # Disable -pipe for now since I had problems bootstrapping gcc 2.5.5 with
  1438. + # it. (fnf)
  1439. + #PIPE = -pipe
  1440. + # Allow the user to override the default host optimization with gcc, or if the
  1441. + # host compiler is not gcc and doesn't understand -O<N>.
  1442. + X_OPTIMIZE = -O2
  1443. + # The standard additional host flags for the compiler.
  1444. + X_CFLAGS = $(X_OPTIMIZE)
  1445. + # Man pages get a wierd suffix...
  1446. + manext = .0
  1447. + # We really shouldn't specify CFLAGS from here, but there's no other way
  1448. + # to get rid of the `-g' indoctrinated by Makefile.in.  Note this becomes
  1449. + # part of both the host compilation CFLAGS and the target compilation
  1450. + # CFLAGS.
  1451. + CFLAGS =
  1452. + # Ranlib does exist, but may not be in a path where the default RANLIB_TEST
  1453. + # expects it, so just force it to true.
  1454. + RANLIB_TEST = true
  1455. + # My current version of ln doesn't work, so use cp instead.  -fnf
  1456. + HARDLINK = cp
  1457. diff -2rcN gcc-2.6.0/config/m68k/xm-amigados.h gcc-2.6.0-amiga/config/m68k/xm-amigados.h
  1458. *** gcc-2.6.0/config/m68k/xm-amigados.h
  1459. --- gcc-2.6.0-amiga/config/m68k/xm-amigados.h    Sun May 29 17:22:03 1994
  1460. ***************
  1461. *** 0 ****
  1462. --- 1,218 ----
  1463. + /* Configuration for GNU C-compiler for Commodore Amiga, running AmigaDOS.
  1464. +    Copyright (C) 1992 Free Software Foundation, Inc.
  1465. +    Contributed by Markus M. Wild (wild@amiga.physik.unizh.ch).
  1466. + This file is part of GNU CC.
  1467. + GNU CC is free software; you can redistribute it and/or modify
  1468. + it under the terms of the GNU General Public License as published by
  1469. + the Free Software Foundation; either version 2, or (at your option)
  1470. + any later version.
  1471. + GNU CC is distributed in the hope that it will be useful,
  1472. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  1473. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  1474. + GNU General Public License for more details.
  1475. + You should have received a copy of the GNU General Public License
  1476. + along with GNU CC; see the file COPYING.  If not, write to
  1477. + the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  1478. + /* first include the generic header, then modify some parts.. */
  1479. + #include "m68k/xm-m68k.h"
  1480. + /* Amiga specific headers, such as from the Native Developer Update kits,
  1481. +    go in SYSTEM_INCLUDE_DIR.  STANDARD_INCLUDE_DIR is the equivalent of
  1482. +    Unix "/usr/include".  All other include paths are set in Makefile. */
  1483. + #define SYSTEM_INCLUDE_DIR    "/gnu/os-include"
  1484. + #define STANDARD_INCLUDE_DIR    "/gnu/include"
  1485. + /* Fork one piped subcommand.  SEARCH_FLAG is the system call to use
  1486. +    (either execv or execvp).  ARGV is the arg vector to use.
  1487. +    NOT_LAST is nonzero if this is not the last subcommand
  1488. +    (i.e. its output should be piped to the next one.)  */
  1489. + #ifndef AMIGADOS_FORK_GCC
  1490. + /* This version uses a more or less amigados-conformant way of running a
  1491. +    program (in the context of the parent). If you want to use -pipe however,
  1492. +    you'll have to use the vfork() version afterwards.
  1493. +    Phil.B: 29-May-94 quick hack (number 20 added to length) because xgcc
  1494. +    doesn't work.
  1495. +  */
  1496. + #define PEXECUTE(SEARCH_FLAG,PROGRAM,ARGV,NOT_LAST) \
  1497. + ({char *_argline;                        \
  1498. +   int _arglinelength, _i;                    \
  1499. +                                 \
  1500. +   for (_i = 1, _arglinelength=0; ARGV[_i]; ++_i)        \
  1501. +     _arglinelength += strlen(ARGV[_i]) + 1;            \
  1502. +                                 \
  1503. +   _arglinelength += strlen(PROGRAM) + 20 + 1;            \
  1504. +                                 \
  1505. +   if (!(_argline = (char *)alloca(_arglinelength)))         \
  1506. +     pfatal_with_name ("alloca");                \
  1507. +                                 \
  1508. +   strcpy(_argline, PROGRAM);                    \
  1509. +   for (_i = 1; ARGV[_i]; ++_i)                     \
  1510. +     {                                \
  1511. +       strcat(_argline, " ");                    \
  1512. +       strcat(_argline, ARGV[_i]);                \
  1513. +     }                                \
  1514. +                                 \
  1515. +   ssystem(_argline); })                        \
  1516. + #define PEXECUTE_RESULT(STATUS, COMMAND) \
  1517. +   ({ STATUS = COMMAND.pid; })
  1518. + #else
  1519. + /* the vfork() version. This one has the drawback, that gcc is not 
  1520. +    interruptible when started from make, since ixemul.library doesn't yet
  1521. +    propagate ^C to subprocesses. */
  1522. + #define PEXECUTE(SEARCH_FLAG,PROGRAM,ARGV,NOT_LAST) \
  1523. + ({int (*_func)() = (SEARCH_FLAG ? execv : execvp);            \
  1524. +   int _pid;                                \
  1525. +   int _pdes[2];                                \
  1526. +   int _input_desc = last_pipe_input;                    \
  1527. +   int _output_desc = STDOUT_FILE_NO;                    \
  1528. +   int _retries, _sleep_interval, _result;                \
  1529. +                                     \
  1530. +   /* If this isn't the last process, make a pipe for its output,    \
  1531. +      and record it as waiting to be the input to the next process.  */    \
  1532. +                                     \
  1533. +   if (NOT_LAST)                                \
  1534. +     {                                    \
  1535. +       if (pipe (_pdes) < 0)                        \
  1536. +     pfatal_with_name ("pipe");                    \
  1537. +       _output_desc = _pdes[WRITE_PORT];                    \
  1538. +       last_pipe_input = _pdes[READ_PORT];                \
  1539. +     }                                    \
  1540. +   else                                    \
  1541. +     last_pipe_input = STDIN_FILE_NO;                    \
  1542. +                                     \
  1543. +   /* Fork a subprocess; wait and retry if it fails.  */            \
  1544. +   _sleep_interval = 1;                            \
  1545. +   for (_retries = 0; _retries < 4; _retries++)                \
  1546. +     {                                    \
  1547. +       _pid = vfork ();                            \
  1548. +       if (_pid >= 0)                            \
  1549. +     break;                                \
  1550. +       sleep (_sleep_interval);                        \
  1551. +       _sleep_interval *= 2;                        \
  1552. +     }                                    \
  1553. +                                     \
  1554. +   switch (_pid)                                \
  1555. +     {                                    \
  1556. +     case -1:                                \
  1557. +       pfatal_with_name ("vfork");                    \
  1558. +       /* NOTREACHED */                            \
  1559. +       _result = 0;                            \
  1560. +       break;                                \
  1561. +                                     \
  1562. +     case 0: /* child */                            \
  1563. +       /* Move the input and output pipes into place, if nec.  */    \
  1564. +       if (_input_desc != STDIN_FILE_NO)                    \
  1565. +     {                                \
  1566. +       close (STDIN_FILE_NO);                    \
  1567. +       dup (_input_desc);                        \
  1568. +       close (_input_desc);                        \
  1569. +     }                                \
  1570. +       if (_output_desc != STDOUT_FILE_NO)                \
  1571. +     {                                \
  1572. +       close (STDOUT_FILE_NO);                    \
  1573. +       dup (_output_desc);                        \
  1574. +       close (_output_desc);                        \
  1575. +     }                                \
  1576. +                                     \
  1577. +       /* Close the parent's descs that aren't wanted here.  */        \
  1578. +       if (last_pipe_input != STDIN_FILE_NO)                \
  1579. +     close (last_pipe_input);                    \
  1580. +                                     \
  1581. +       /* Exec the program.  */                        \
  1582. +       (*_func) (PROGRAM, ARGV);                        \
  1583. +       perror_exec (PROGRAM);                        \
  1584. +       exit (-1);                            \
  1585. +       /* NOTREACHED */                            \
  1586. +       _result = 0;                            \
  1587. +       break;                                \
  1588. +                                     \
  1589. +     default:                                \
  1590. +       /* In the parent, after forking.                    \
  1591. +      Close the descriptors that we made for this child.  */        \
  1592. +       if (_input_desc != STDIN_FILE_NO)                    \
  1593. +     close (_input_desc);                        \
  1594. +       if (_output_desc != STDOUT_FILE_NO)                \
  1595. +     close (_output_desc);                        \
  1596. +                                     \
  1597. +       /* Return child's process number.  */                \
  1598. +       _result = _pid;                            \
  1599. +       break;                                \
  1600. +     }                                     \
  1601. + _result; })                                \
  1602. + #define PEXECUTE_RESULT(STATUS, COMMAND) \
  1603. +   ({ wait (& STATUS); })
  1604. + #endif /* AMIGADOS_FORK_GCC */
  1605. + /* the following macros are stolen more or less from xm-vms.h ... */
  1606. + /* This macro is used to help compare filenames in cp-lex.c.
  1607. +    We also need to make sure that the names are all lower case, because
  1608. +    we must be able to compare filenames to determine if a file implements
  1609. +    a class.  */
  1610. + #define FILE_NAME_NONDIRECTORY(C)                \
  1611. + ({                                \
  1612. +    extern char *rindex();                    \
  1613. +    char * pnt_ = (C), * pnt1_;                    \
  1614. +    pnt1_ = pnt_ - 1;                        \
  1615. +    while (*++pnt1_)                        \
  1616. +      if ((*pnt1_ >= 'A' && *pnt1_ <= 'Z')) *pnt1_ |= 0x20;    \
  1617. +    pnt1_ = rindex (pnt_, '/');                     \
  1618. +    pnt1_ = (pnt1_ == 0 ? rindex (pnt_, ':') : pnt1_);        \
  1619. +    (pnt1_ == 0 ? pnt_ : pnt1_ + 1);                \
  1620. +  })
  1621. + /* Macro to generate the name of the cross reference file.  The standard
  1622. +    one does not work, since it was written assuming that the conventions
  1623. +    of a unix style filesystem will work on the host system.
  1624. +  
  1625. +    Contrary to VMS, I'm using the original unix filename, there's no reason
  1626. +    not to use this under AmigaDOS. */
  1627. + #define XREF_FILE_NAME(BUFF, NAME)    \
  1628. +   s = FILE_NAME_NONDIRECTORY (NAME);            \
  1629. +   if (s == NAME) sprintf(BUFF, ".%s.gxref", NAME);    \
  1630. +   else {                        \
  1631. +     unsigned char ch = *s; /* could be Latin1 char.. */    \
  1632. +     /* temporary: cut the filename from the directory */\
  1633. +     *s = 0;                        \
  1634. +     sprintf (BUFF, "%s.%c%s.gxref", NAME, ch, s+1);    \
  1635. +     /* and restore the filename */            \
  1636. +     *s = ch;                        \
  1637. +   }                            \
  1638. + /* Macro that is used in cp-xref.c to determine whether a file name is
  1639. +    absolute or not.
  1640. +    This checks for both, '/' as first character, since we're running under
  1641. +    ixemul.library which provides for this unix'ism, and for the usual 
  1642. +    logical-terminator, ':', somewhere in the filename. */
  1643. + #define FILE_NAME_ABSOLUTE_P(NAME) (NAME[0] == '/' || index(NAME, ':'))
  1644. + /* the colon conflicts with the name space of logicals */
  1645. + #define PATH_SEPARATOR ','
  1646. + /* AmigaDOS handles rename(2) *much* better than any link(2)/unlink(2)
  1647. +    hacks. It's actually the inverse case as on Unix. rename(2) was always
  1648. +    there, link(2) is new with OS 2.0 */
  1649. + #define HAVE_rename 1
  1650. diff -2rcN gcc-2.6.0/configure gcc-2.6.0-amiga/configure
  1651. *** gcc-2.6.0/configure    Sun Jul 10 20:45:35 1994
  1652. --- gcc-2.6.0-amiga/configure    Sun Jul 10 21:51:45 1994
  1653. ***************
  1654. *** 47,52 ****
  1655.   # Default --srcdir to the directory where the script is found, 
  1656.   # if a directory was specified.
  1657. ! # The second sed call is to convert `.//configure' to `./configure'.
  1658. ! srcdir=`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`
  1659.   if [ x$srcdir = x$0 ]
  1660.   then
  1661. --- 47,54 ----
  1662.   # Default --srcdir to the directory where the script is found, 
  1663.   # if a directory was specified.
  1664. ! # The first sed call works around a bug in the AmigaDOS port of sksh, where
  1665. ! # $0 has a trailing slash appended to it.  It is a NOP for other systems.
  1666. ! # The third sed call is to convert `.//configure' to `./configure'.
  1667. ! srcdir=`echo $0 | sed 's|/$||' | sed 's|//|/|' | sed 's|/[^/]*$||'`
  1668.   if [ x$srcdir = x$0 ]
  1669.   then
  1670. ***************
  1671. *** 56,69 ****
  1672.   host=
  1673.   
  1674. ! # Default prefix to /usr/local.
  1675. ! prefix=/usr/local
  1676.   
  1677. ! # local_prefix specifies where to find the directory /usr/local/include
  1678.   # We don't use $(prefix) for this
  1679. ! # because we always want GCC to search /usr/local/include
  1680. ! # even if GCC is installed somewhere other than /usr/local.
  1681.   # Think THREE TIMES before specifying any other value for this!
  1682.   # DO NOT make this use $prefix!
  1683. ! local_prefix=/usr/local
  1684.   # Default is to let the Makefile set exec_prefix from $(prefix)
  1685.   exec_prefix='$(prefix)'
  1686. --- 58,81 ----
  1687.   host=
  1688.   
  1689. ! # Note:  For AmigaDOS we want this to default to /gnu unless we specify
  1690. ! # otherwise to configure.  We also don't want to have to remember to always
  1691. ! # configure with "--prefix=/gnu".  Changing it in Makefile.in or in
  1692. ! # config/m68k/x-amigados is ineffective since configure will always change
  1693. ! # it back in the final generated Makefile, so we have to go to the root of
  1694. ! # the problem, which is here.  There should be a way to do this in the
  1695. ! # individual machine configuration files!  -fnf
  1696. ! # here.  -fnf
  1697. ! # Default prefix to "/gnu".
  1698. ! prefix=/gnu
  1699.   
  1700. ! # local_prefix specifies where to find the directory /gnu/local/include
  1701.   # We don't use $(prefix) for this
  1702. ! # because we always want GCC to search /gnu/local/include
  1703. ! # even if GCC is installed somewhere other than /gnu/local.
  1704.   # Think THREE TIMES before specifying any other value for this!
  1705.   # DO NOT make this use $prefix!
  1706. ! # Note:  See AmigaDOS note above for this AmigaDOS specific change.  -fnf
  1707. ! # NoteII:We don't want to have yet-another-assign so we use /gnu/local
  1708. ! local_prefix=/gnu/local
  1709.   # Default is to let the Makefile set exec_prefix from $(prefix)
  1710.   exec_prefix='$(prefix)'
  1711. ***************
  1712. *** 73,78 ****
  1713.   
  1714.   remove=rm
  1715. ! hard_link=ln
  1716. ! symbolic_link='ln -s'
  1717.   copy=cp
  1718.   
  1719. --- 85,95 ----
  1720.   
  1721.   remove=rm
  1722. ! # AmigaDOS specific change.  Although we support symbolic links using
  1723. ! # the GNU tools, they need to be made using the syntax "somewhere:foo/bar"
  1724. ! # and not "/somewhere/foo/bar", since they must be in standard AmigaDOS
  1725. ! # format.  This should probably be done by having GNU ln translate paths
  1726. ! # that start with '/' to canonical AmigaDOS device:name form.
  1727. ! hard_link=cp
  1728. ! symbolic_link=cp
  1729.   copy=cp
  1730.   
  1731. ***************
  1732. *** 319,323 ****
  1733.       # Set this to override the default target model.
  1734.       target_cpu_default=
  1735. !     # Set this to force use of install.sh.
  1736.       broken_install=
  1737.       # Set this to control which fixincludes program to use.
  1738. --- 336,341 ----
  1739.       # Set this to override the default target model.
  1740.       target_cpu_default=
  1741. !     # Set this to force use of install.sh (if set to 'yes')
  1742. !     # Set to name of installer to use a custom installer.
  1743.       broken_install=
  1744.       # Set this to control which fixincludes program to use.
  1745. ***************
  1746. *** 1041,1044 ****
  1747. --- 1059,1072 ----
  1748.           header_files=math-68881.h
  1749.           ;;
  1750. +     m68k-*-amigados)
  1751. +         xm_file=m68k/xm-amigados.h
  1752. +         out_file=m68k/amigados.c
  1753. +         tm_file=m68k/amigados.h
  1754. +         tmake_file=m68k/t-amigados
  1755. +         xmake_file=m68k/x-amigados
  1756. +         fixincludes=Makefile.in # Headers are already fixed.
  1757. +         broken_install=cp
  1758. +         install_headers_dir=install-headers-cp
  1759. +         ;;
  1760.       m68k-cbm-sysv4*)        # Commodore variant of V.4.
  1761.           tm_file=m68k/amix.h
  1762. ***************
  1763. *** 1901,1905 ****
  1764.       # Also change its value of srcdir.
  1765.       # Also create a .gdbinit file which runs the one in srcdir
  1766. !     # and tells GDB to look there for source files.
  1767.       case $srcdir in
  1768.       . | ./$subdir | .././$subdir)
  1769. --- 1929,1933 ----
  1770.       # Also change its value of srcdir.
  1771.       # Also create a .gdbinit file which runs the one in srcdir
  1772. !     # and tells GDB to     look there for source files.
  1773.       case $srcdir in
  1774.       . | ./$subdir | .././$subdir)
  1775. ***************
  1776. *** 1948,1953 ****
  1777.       else
  1778.           rm -f Makefile.xx
  1779. !         abssrcdir=`cd ${srcdir}; pwd`
  1780. !         sed "s|^INSTALL = .*|INSTALL = ${abssrcdir}/install.sh -c|" Makefile.tem > Makefile.xx
  1781.           rm -f Makefile.tem
  1782.           mv Makefile.xx Makefile.tem
  1783. --- 1976,1987 ----
  1784.       else
  1785.           rm -f Makefile.xx
  1786. !          if [ x$host_broken_install = xyes ]
  1787. !          then
  1788. !              abssrcdir=`cd ${srcdir}; pwd`
  1789. !              installer=${abssrcdir}/install.sh -c
  1790. !          else
  1791. !              installer=$host_broken_install
  1792. !          fi
  1793. !          sed "s|^INSTALL = .*|INSTALL = ${installer}|" Makefile.tem > Makefile.xx
  1794.           rm -f Makefile.tem
  1795.           mv Makefile.xx Makefile.tem
  1796. ***************
  1797. *** 2237,2240 ****
  1798. --- 2271,2288 ----
  1799.       
  1800.       # If a subdirectory has a configure script, run it.
  1801. +     if [ x$subdir != x. ]
  1802. +     then
  1803. +         if [ -f $srcdir/configure ]
  1804. +         then
  1805. +             ${CONFIG_SHELL-sh} $srcdir/configure $arguments --srcdir=$srcdir
  1806. +         fi
  1807. +     fi
  1808. +     if [ xx${vint} != xx ]
  1809. +     then
  1810. +         vintmsg=" (vint)"
  1811. +     fi
  1812. +     # If a subdirectory has a configure script, run it.
  1813.       if [ x$subdir != x. ]
  1814.       then
  1815. diff -2rcN gcc-2.6.0/gcc.c gcc-2.6.0-amiga/gcc.c
  1816. *** gcc-2.6.0/gcc.c    Thu Jul  7 10:12:32 1994
  1817. --- gcc-2.6.0-amiga/gcc.c    Tue Jul  5 23:32:29 1994
  1818. ***************
  1819. *** 1271,1279 ****
  1820.   
  1821.   #ifndef STANDARD_EXEC_PREFIX
  1822. ! #define STANDARD_EXEC_PREFIX "/usr/local/lib/gcc-lib/"
  1823.   #endif /* !defined STANDARD_EXEC_PREFIX */
  1824.   
  1825.   static char *standard_exec_prefix = STANDARD_EXEC_PREFIX;
  1826. ! static char *standard_exec_prefix_1 = "/usr/lib/gcc/";
  1827.   #ifdef MD_EXEC_PREFIX
  1828.   static char *md_exec_prefix = MD_EXEC_PREFIX;
  1829. --- 1271,1279 ----
  1830.   
  1831.   #ifndef STANDARD_EXEC_PREFIX
  1832. ! #define STANDARD_EXEC_PREFIX "/gnu/lib/gcc-lib/"
  1833.   #endif /* !defined STANDARD_EXEC_PREFIX */
  1834.   
  1835.   static char *standard_exec_prefix = STANDARD_EXEC_PREFIX;
  1836. ! static char *standard_exec_prefix_1 = "/local/lib/gcc-lib/";
  1837.   #ifdef MD_EXEC_PREFIX
  1838.   static char *md_exec_prefix = MD_EXEC_PREFIX;
  1839. ***************
  1840. *** 1281,1285 ****
  1841.   
  1842.   #ifndef STANDARD_STARTFILE_PREFIX
  1843. ! #define STANDARD_STARTFILE_PREFIX "/usr/local/lib/"
  1844.   #endif /* !defined STANDARD_STARTFILE_PREFIX */
  1845.   
  1846. --- 1281,1285 ----
  1847.   
  1848.   #ifndef STANDARD_STARTFILE_PREFIX
  1849. ! #define STANDARD_STARTFILE_PREFIX "/gnu/lib/"
  1850.   #endif /* !defined STANDARD_STARTFILE_PREFIX */
  1851.   
  1852. ***************
  1853. *** 1291,1299 ****
  1854.   #endif
  1855.   static char *standard_startfile_prefix = STANDARD_STARTFILE_PREFIX;
  1856. ! static char *standard_startfile_prefix_1 = "/lib/";
  1857. ! static char *standard_startfile_prefix_2 = "/usr/lib/";
  1858.   
  1859.   #ifndef TOOLDIR_BASE_PREFIX
  1860. ! #define TOOLDIR_BASE_PREFIX "/usr/local/"
  1861.   #endif
  1862.   static char *tooldir_base_prefix = TOOLDIR_BASE_PREFIX;
  1863. --- 1291,1299 ----
  1864.   #endif
  1865.   static char *standard_startfile_prefix = STANDARD_STARTFILE_PREFIX;
  1866. ! static char *standard_startfile_prefix_1 = "/local/lib/";
  1867. ! static char *standard_startfile_prefix_2 = "/local/lib/";
  1868.   
  1869.   #ifndef TOOLDIR_BASE_PREFIX
  1870. ! #define TOOLDIR_BASE_PREFIX "/local/"
  1871.   #endif
  1872.   static char *tooldir_base_prefix = TOOLDIR_BASE_PREFIX;
  1873. ***************
  1874. *** 1496,1501 ****
  1875. --- 1496,1506 ----
  1876.   #endif
  1877.   
  1878. + #ifdef amigados
  1879. +   if (!base) /* No env var set */
  1880. +     base = "RAM:";
  1881. + #else
  1882.     base = choose_temp_base_try ("/usr/tmp", base);
  1883.     base = choose_temp_base_try ("/tmp", base);
  1884. + #endif
  1885.   
  1886.     /* If all else fails, use the current directory! */  
  1887. ***************
  1888. *** 1506,1510 ****
  1889.     temp_filename = xmalloc (len + sizeof("/ccXXXXXX") + 1);
  1890.     strcpy (temp_filename, base);
  1891. !   if (len > 0 && temp_filename[len-1] != '/')
  1892.       temp_filename[len++] = '/';
  1893.     strcpy (temp_filename + len, "ccXXXXXX");
  1894. --- 1511,1519 ----
  1895.     temp_filename = xmalloc (len + sizeof("/ccXXXXXX") + 1);
  1896.     strcpy (temp_filename, base);
  1897. !   if (len > 0 && temp_filename[len-1] != '/'
  1898. ! #ifdef amigados
  1899. !                         && temp_filename[len-1] != ':'
  1900. ! #endif
  1901. !                                     )
  1902.       temp_filename[len++] = '/';
  1903.     strcpy (temp_filename + len, "ccXXXXXX");
  1904. ***************
  1905. *** 1651,1655 ****
  1906.     /* Determine the filename to execute (special case for absolute paths).  */
  1907.   
  1908. !   if (*name == '/')
  1909.       {
  1910.         if (access (name, mode))
  1911. --- 1660,1668 ----
  1912.     /* Determine the filename to execute (special case for absolute paths).  */
  1913.   
  1914. !   if (*name == '/'
  1915. ! #ifdef amigados
  1916. !           || index (name, ':')
  1917. ! #endif
  1918. !                     )
  1919.       {
  1920.         if (access (name, mode))
  1921. ***************
  1922. *** 1871,1874 ****
  1923. --- 1884,1888 ----
  1924.      (i.e. its output should be piped to the next one.)  */
  1925.   
  1926. + #ifndef PEXECUTE
  1927.   #ifndef OS2
  1928.   #ifdef __MSDOS__
  1929. ***************
  1930. *** 2026,2029 ****
  1931. --- 2040,2044 ----
  1932.   }
  1933.   #endif /* not OS2 */
  1934. + #endif /* !defined (PEXECUTE) */
  1935.   
  1936.   /* Execute the command specified by the arguments on the current line of spec.
  1937. ***************
  1938. *** 2120,2126 ****
  1939. --- 2135,2147 ----
  1940.         char *string = commands[i].argv[0];
  1941.   
  1942. + #ifdef PEXECUTE
  1943. +       commands[i].pid = PEXECUTE (string != commands[i].prog,
  1944. +                   string, commands[i].argv,
  1945. +                   i + 1 < n_commands);
  1946. + #else
  1947.         commands[i].pid = pexecute (string != commands[i].prog,
  1948.                     string, commands[i].argv,
  1949.                     i + 1 < n_commands);
  1950. + #endif
  1951.   
  1952.         if (string != commands[i].prog)
  1953. ***************
  1954. *** 2143,2146 ****
  1955. --- 2164,2170 ----
  1956.       char *prog = "unknown";
  1957.   
  1958. + #ifdef PEXECUTE_RESULT
  1959. +     pid = PEXECUTE_RESULT (status, commands[i]);
  1960. + #else /* PEXECUTE_RESULT */
  1961.   #ifdef __MSDOS__
  1962.           status = pid = commands[i].pid;
  1963. ***************
  1964. *** 2148,2151 ****
  1965. --- 2172,2176 ----
  1966.       pid = wait (&status);
  1967.   #endif
  1968. + #endif /* PEXECUTE_RESULT */
  1969.       if (pid < 0)
  1970.         abort ();
  1971. ***************
  1972. *** 2264,2267 ****
  1973. --- 2289,2293 ----
  1974.           {
  1975.             strncpy (nstore, startp, endp-startp);
  1976. + #ifndef amigados
  1977.             if (endp == startp)
  1978.           {
  1979. ***************
  1980. *** 2275,2278 ****
  1981. --- 2301,2313 ----
  1982.             else
  1983.           nstore[endp-startp] = 0;
  1984. + #else
  1985. +           if (endp[-1] != '/' && endp[-1] != ':')
  1986. +         {
  1987. +           nstore[endp-startp] = '/';
  1988. +           nstore[endp-startp+1] = 0;
  1989. +         }
  1990. +           else
  1991. +         nstore[endp-startp] = 0;
  1992. + #endif
  1993.             add_prefix (&exec_prefix, nstore, 0, 0, NULL_PTR);
  1994.             if (*endp == 0)
  1995. ***************
  1996. *** 2297,2300 ****
  1997. --- 2332,2336 ----
  1998.           {
  1999.             strncpy (nstore, startp, endp-startp);
  2000. + #ifndef amigados
  2001.             if (endp == startp)
  2002.           {
  2003. ***************
  2004. *** 2308,2311 ****
  2005. --- 2344,2356 ----
  2006.             else
  2007.           nstore[endp-startp] = 0;
  2008. + #else
  2009. +           if (endp[-1] != '/' && endp[-1] != ':')
  2010. +         {
  2011. +           nstore[endp-startp] = '/';
  2012. +           nstore[endp-startp+1] = 0;
  2013. +         }
  2014. +           else
  2015. +         nstore[endp-startp] = 0;
  2016. + #endif
  2017.             add_prefix (&startfile_prefix, nstore, 0, 0, NULL_PTR);
  2018.             if (*endp == 0)
  2019. ***************
  2020. *** 2331,2334 ****
  2021. --- 2376,2380 ----
  2022.           {
  2023.             strncpy (nstore, startp, endp-startp);
  2024. + #ifndef amigados
  2025.             if (endp == startp)
  2026.           {
  2027. ***************
  2028. *** 2342,2345 ****
  2029. --- 2388,2400 ----
  2030.             else
  2031.           nstore[endp-startp] = 0;
  2032. + #else
  2033. +           if (endp[-1] != '/' && endp[-1] != ':')
  2034. +         {
  2035. +           nstore[endp-startp] = '/';
  2036. +           nstore[endp-startp+1] = 0;
  2037. +         }
  2038. +           else
  2039. +         nstore[endp-startp] = 0;
  2040. + #endif
  2041.             add_prefix (&startfile_prefix, nstore, 0, 0, NULL_PTR);
  2042.             if (*endp == 0)
  2043. ***************
  2044. *** 4214,4221 ****
  2045. --- 4269,4280 ----
  2046.         int len;
  2047.   
  2048. + #ifdef FILE_NAME_NONDIRECTORY
  2049. +       input_basename = FILE_NAME_NONDIRECTORY (input_filename);
  2050. + #else
  2051.         input_basename = input_filename;
  2052.         for (p = input_filename; *p; p++)
  2053.           if (*p == '/')
  2054.             input_basename = p + 1;
  2055. + #endif
  2056.   
  2057.         /* Find a suffix starting with the last period,
  2058. diff -2rcN gcc-2.6.0/genconfig.c gcc-2.6.0-amiga/genconfig.c
  2059. *** gcc-2.6.0/genconfig.c    Thu Jun 16 14:57:07 1994
  2060. --- gcc-2.6.0-amiga/genconfig.c    Fri Jun 17 02:01:30 1994
  2061. ***************
  2062. *** 304,309 ****
  2063. --- 304,317 ----
  2064.   from the machine description file `md'.  */\n\n");
  2065.   
  2066. + #ifdef amigados
  2067. +   /* this constant probably better be 14 in general, or a cross compiling
  2068. +      host might choke on some amigados header files... */
  2069. +   /* Allow at least 14 operands for the sake of asm constructs.  */
  2070. +   max_recog_operands = 14;
  2071. + #else
  2072.     /* Allow at least 10 operands for the sake of asm constructs.  */
  2073.     max_recog_operands = 9;  /* We will add 1 later.  */
  2074. + #endif
  2075.     max_dup_operands = 1;
  2076.   
  2077. diff -2rcN gcc-2.6.0/ginclude/stdarg.h gcc-2.6.0-amiga/ginclude/stdarg.h
  2078. *** gcc-2.6.0/ginclude/stdarg.h    Sun Jul 10 20:45:49 1994
  2079. --- gcc-2.6.0-amiga/ginclude/stdarg.h    Sun Jul 10 21:53:55 1994
  2080. ***************
  2081. *** 157,159 ****
  2082. --- 157,167 ----
  2083.   
  2084.   #endif /* not _ANSI_STDARG_H_ */
  2085. + #ifdef amigados
  2086. + # ifndef _VA_LIST
  2087. + #  define _VA_LIST
  2088. +    typedef __gnuc_va_list va_list;
  2089. + # endif
  2090. + #endif /* amigados */
  2091.   #endif /* not _STDARG_H */
  2092. diff -2rcN gcc-2.6.0/ginclude/stddef.h gcc-2.6.0-amiga/ginclude/stddef.h
  2093. *** gcc-2.6.0/ginclude/stddef.h    Mon Apr 25 19:13:23 1994
  2094. --- gcc-2.6.0-amiga/ginclude/stddef.h    Sun May  8 14:12:47 1994
  2095. ***************
  2096. *** 4,7 ****
  2097. --- 4,47 ----
  2098.   #ifndef __STDDEF_H__
  2099.   
  2100. + #ifdef amigados
  2101. + /* GNU libc has special support in this file, 4.3bsd-net2 libc deserves that
  2102. +    just as well. The system headers are ANSI compliant, the used compiler IS
  2103. +    gcc, so it's really ok to use the system header, no reason to hassle
  2104. +    with a jungle of ifdefs. Besides, amigados is only defined if compiling
  2105. +    with host=amigados, it doesn't apply if compiling with target=amigados
  2106. +    on a different host with possibly different system headers. Same thing
  2107. +    would apply to gstdarg.h and gvarargs.h, but those headers are more
  2108. +    easily fixable than this one and I'm sick of writing the same comment
  2109. +    there as well. MW
  2110. +    Include the contents of <stddef.h> inline rather than with a #include,
  2111. +    to avoid infinite include recursion when this file is installed in
  2112. +    gcc's include directory as stddef.h.  (fnf)  */
  2113. + #define _STDDEF_H_
  2114. + #include <machine/ansi.h>
  2115. + typedef    _PTRDIFF_T_    ptrdiff_t;
  2116. + #ifdef    _SIZE_T_
  2117. + typedef    _SIZE_T_    size_t;
  2118. + #undef    _SIZE_T_
  2119. + #endif
  2120. + #ifdef    _WCHAR_T_
  2121. + typedef    _WCHAR_T_    wchar_t;
  2122. + #undef    _WCHAR_T_
  2123. + #endif
  2124. + #ifndef    NULL
  2125. + #define    NULL    0
  2126. + #endif
  2127. + #define    offsetof(type, member)    ((size_t)(&((type *)0)->member))
  2128. + #else /* not amigados */
  2129.   /* Any one of these symbols __need_* means that GNU libc
  2130.      wants us just to define one data type.  So don't define
  2131. ***************
  2132. *** 173,176 ****
  2133. --- 213,218 ----
  2134.   #define __WCHAR_TYPE__ int
  2135.   #endif
  2136. + #endif /* not  amigados */
  2137.   typedef __WCHAR_TYPE__ wchar_t;
  2138.   #endif
  2139. diff -2rcN gcc-2.6.0/ginclude/varargs.h gcc-2.6.0-amiga/ginclude/varargs.h
  2140. *** gcc-2.6.0/ginclude/varargs.h    Sun Jul 10 20:45:49 1994
  2141. --- gcc-2.6.0-amiga/ginclude/varargs.h    Mon Jul 11 10:43:10 1994
  2142. ***************
  2143. *** 174,175 ****
  2144. --- 174,182 ----
  2145.   #undef _BSD_VA_LIST
  2146.   #endif
  2147. + #ifdef amigados
  2148. + # ifndef _VA_LIST
  2149. + #  define _VA_LIST
  2150. +    typedef __gnuc_va_list va_list;
  2151. + # endif
  2152. + #endif /* amigados */
  2153. diff -2rcN gcc-2.6.0/protoize.c gcc-2.6.0-amiga/protoize.c
  2154. *** gcc-2.6.0/protoize.c    Thu Jun 30 11:32:46 1994
  2155. --- gcc-2.6.0-amiga/protoize.c    Sat Jun 25 01:42:13 1994
  2156. ***************
  2157. *** 829,834 ****
  2158. --- 829,839 ----
  2159.     struct default_include *p;
  2160.   
  2161. + #ifdef FILE_NAME_ABSOLUTE_P
  2162. +   if (! FILE_NAME_ABSOLUTE_P (path))
  2163. +     abort ();
  2164. + #else
  2165.     if (path[0] != '/')
  2166.       abort ();        /* Must be an absolutized filename.  */
  2167. + #endif
  2168.   
  2169.     for (p = include_defaults; p->fname; p++)
  2170. ***************
  2171. *** 1257,1261 ****
  2172. --- 1262,1270 ----
  2173.       const char *src_p;
  2174.   
  2175. + #ifdef FILE_NAME_ABSOLUTE_P
  2176. +     if (! FILE_NAME_ABSOLUTE_P (rel_filename))
  2177. + #else
  2178.       if (rel_filename[0] != '/')
  2179. + #endif
  2180.         {
  2181.           src_p = cwd2;
  2182. ***************
  2183. *** 1520,1523 ****
  2184. --- 1529,1551 ----
  2185.   }
  2186.   
  2187. + /* Use this macro to advance a char * over the filename part in a line
  2188. +    read from an aux-info file. */
  2189. + #ifndef amigados
  2190. + /* Version for file systems where the colon has no special meaning */
  2191. + #define ADVANCE_PAST_FILENAME(CP) \
  2192. +   while (* (CP) != ':') (CP)++
  2193. + #else
  2194. + /* Have to heuristically decide whether the colon is part of the filename
  2195. +    or whether it serves to delimit the filename from the line number. If
  2196. +    it's the latter case, then the character following the colon *must*
  2197. +    be a digit. Note that this heuristic fails if the filename starts
  2198. +    with a digit. */
  2199. + #define ADVANCE_PAST_FILENAME(CP) \
  2200. +     while ((CP)[0] != ':' || !isdigit ((CP)[1])) \
  2201. +       (CP)++;
  2202. + #endif
  2203.   /* Given a line from  an aux info file, and a time at which the aux info
  2204.      file it came from was created, check to see if the item described in
  2205. ***************
  2206. *** 1541,1546 ****
  2207.       const char *filename_start = p = l + 3;
  2208.   
  2209. !     while (*p != ':')
  2210. !       p++;
  2211.       filename = (char *) alloca ((size_t) (p - filename_start) + 1);
  2212.       strncpy (filename, filename_start, (size_t) (p - filename_start));
  2213. --- 1569,1573 ----
  2214.       const char *filename_start = p = l + 3;
  2215.   
  2216. !     ADVANCE_PAST_FILENAME (p);
  2217.       filename = (char *) alloca ((size_t) (p - filename_start) + 1);
  2218.       strncpy (filename, filename_start, (size_t) (p - filename_start));
  2219. ***************
  2220. *** 1599,1604 ****
  2221.       char *filename;
  2222.   
  2223. !     while (*p != ':')
  2224. !       p++;
  2225.       filename = (char *) alloca ((size_t) (p - filename_start) + 1);
  2226.       strncpy (filename, filename_start, (size_t) (p - filename_start));
  2227. --- 1626,1630 ----
  2228.       char *filename;
  2229.   
  2230. !     ADVANCE_PAST_FILENAME (p);
  2231.       filename = (char *) alloca ((size_t) (p - filename_start) + 1);
  2232.       strncpy (filename, filename_start, (size_t) (p - filename_start));
  2233. ***************
  2234. *** 2320,2324 ****
  2235.       char *p = aux_info_base;
  2236.   
  2237. !     while (*p != ':')
  2238.         p++;
  2239.       p++;
  2240. --- 2346,2352 ----
  2241.       char *p = aux_info_base;
  2242.   
  2243. !     /* have to make sure at least one space is following the colon to make
  2244. !        sure the colon is not part of the filename */
  2245. !     while (*p != ':' && p[1] != ' ')
  2246.         p++;
  2247.       p++;
  2248. ***************
  2249. *** 2334,2338 ****
  2250.       aux_info_second_line = p;
  2251.       aux_info_relocated_name = 0;
  2252. !     if (invocation_filename[0] != '/')
  2253.         {
  2254.       /* INVOCATION_FILENAME is relative;
  2255. --- 2362,2370 ----
  2256.       aux_info_second_line = p;
  2257.       aux_info_relocated_name = 0;
  2258. ! #ifdef FILE_NAME_ABSOLUTE_P
  2259. !     if (! FILE_NAME_ABSOLUTE_P (invocation_filename))
  2260. ! #else
  2261. !       if (invocation_filename[0] != '/')
  2262. ! #endif
  2263.         {
  2264.       /* INVOCATION_FILENAME is relative;
  2265. ***************
  2266. *** 2423,2427 ****
  2267.   
  2268.   /* Check an individual filename for a .c suffix.  If the filename has this
  2269. !    suffix, rename the file such that its suffix is changed to .C.  This
  2270.      function implements the -C option.  */
  2271.   
  2272. --- 2455,2459 ----
  2273.   
  2274.   /* Check an individual filename for a .c suffix.  If the filename has this
  2275. !    suffix, rename the file such that its suffix is changed to .cc.  This
  2276.      function implements the -C option.  */
  2277.   
  2278. ***************
  2279. *** 2432,2436 ****
  2280.     const char *filename = hp->symbol;
  2281.     int last_char_index = strlen (filename) - 1;
  2282. !   char *const new_filename = (char *) alloca (strlen (filename) + 1);
  2283.   
  2284.     /* Note that we don't care here if the given file was converted or not.  It
  2285. --- 2464,2468 ----
  2286.     const char *filename = hp->symbol;
  2287.     int last_char_index = strlen (filename) - 1;
  2288. !   char *const new_filename = (char *) alloca (strlen (filename) + 2);
  2289.   
  2290.     /* Note that we don't care here if the given file was converted or not.  It
  2291. ***************
  2292. *** 2444,2449 ****
  2293.   
  2294.     strcpy (new_filename, filename);
  2295. !   new_filename[last_char_index] = 'C';
  2296.   
  2297.     if (my_link (filename, new_filename) == -1)
  2298.       {
  2299. --- 2476,2498 ----
  2300.   
  2301.     strcpy (new_filename, filename);
  2302. !   strcat (new_filename + last_char_index, "cc");
  2303. !   
  2304. !   /* use rename(2) if available !! Update config files to include HAVE_rename
  2305. !      if the used OS provides it. Advantages are: it's atomic, it's one
  2306. !      system call compared to two. */
  2307. ! #ifdef HAVE_rename
  2308. !   /* if the mentioned systems (POSIX 1003.1-1988) have rename(2), this has
  2309. !      to be changed to `my_rename' as well. */
  2310.   
  2311. +   if (rename (filename, new_filename) == -1)
  2312. +     {
  2313. +       fprintf (stderr, "%s: warning: can't rename file `%s' to `%s': %s\n",
  2314. +            pname, shortpath (NULL, filename),
  2315. +            shortpath (NULL, new_filename), sys_errlist[errno]);
  2316. +       errors++;
  2317. +       return;
  2318. +     }
  2319. + #else
  2320.     if (my_link (filename, new_filename) == -1)
  2321.       {
  2322. ***************
  2323. *** 2462,2465 ****
  2324. --- 2511,2515 ----
  2325.         return;
  2326.       }
  2327. + #endif
  2328.   }
  2329.   
  2330. diff -2rcN gcc-2.6.0/real.c gcc-2.6.0-amiga/real.c
  2331. *** gcc-2.6.0/real.c    Thu Jun 30 11:33:37 1994
  2332. --- gcc-2.6.0-amiga/real.c    Fri Jul  1 00:51:55 1994
  2333. ***************
  2334. *** 4280,4286 ****
  2335. --- 4280,4292 ----
  2336.       {
  2337.         if (sign)
  2338. + #ifdef amigados
  2339.       sprintf (wstring, " -Infinity ");
  2340.         else
  2341.       sprintf (wstring, " Infinity ");
  2342. + #else
  2343. +     sprintf (wstring, " -NaN ");
  2344. +       else
  2345. +     sprintf (wstring, " NaN ");
  2346. + #endif
  2347.         goto bxit;
  2348.       }
  2349. diff -2rcN gcc-2.6.0/scan-types.sh gcc-2.6.0-amiga/scan-types.sh
  2350. *** gcc-2.6.0/scan-types.sh    Mon Apr 18 08:07:12 1994
  2351. --- gcc-2.6.0-amiga/scan-types.sh    Sun May  8 14:13:30 1994
  2352. ***************
  2353. *** 1,3 ****
  2354. ! #! /bin/sh
  2355.   # Deduce values of standard ANSI and POSIX types (e.g. size_t, pid_t).
  2356.   # Emits macros definitions for these, and some other types.
  2357. --- 1,3 ----
  2358. ! #!/bin/sh
  2359.   # Deduce values of standard ANSI and POSIX types (e.g. size_t, pid_t).
  2360.   # Emits macros definitions for these, and some other types.
  2361. diff -2rcN gcc-2.6.0/toplev.c gcc-2.6.0-amiga/toplev.c
  2362. *** gcc-2.6.0/toplev.c    Fri Jul  8 11:07:17 1994
  2363. --- gcc-2.6.0-amiga/toplev.c    Sat Jul  9 00:52:25 1994
  2364. ***************
  2365. *** 533,536 ****
  2366. --- 533,537 ----
  2367.     {"writable-strings", &flag_writable_strings, 1},
  2368.     {"peephole", &flag_no_peephole, 0},
  2369. +   {"large-baserel", &flag_pic, 4},
  2370.     {"force-mem", &flag_force_mem, 1},
  2371.     {"force-addr", &flag_force_addr, 1},
  2372. ***************
  2373. *** 551,554 ****
  2374. --- 552,556 ----
  2375.     {"pic", &flag_pic, 1},
  2376.     {"PIC", &flag_pic, 2},
  2377. +   {"baserel", &flag_pic, 3},
  2378.     {"fast-math", &flag_fast_math, 1},
  2379.     {"common", &flag_no_common, 0},
  2380. ***************
  2381. *** 1948,1951 ****
  2382. --- 1950,1956 ----
  2383.        char *input_name;
  2384.   {
  2385. + #ifdef FILE_NAME_NONDIRECTORY
  2386. +   char *na = FILE_NAME_NONDIRECTORY (input_name);
  2387. + #else
  2388.     int len = strlen (input_name);
  2389.     char *na = input_name + len;
  2390. ***************
  2391. *** 1958,1961 ****
  2392. --- 1963,1967 ----
  2393.         na--;
  2394.       }
  2395. + #endif
  2396.   
  2397.   #ifdef ASM_OUTPUT_MAIN_SOURCE_FILENAME
  2398. ***************
  2399. *** 3930,3933 ****
  2400. --- 3936,3940 ----
  2401.   #ifndef OS2
  2402.   #ifndef VMS
  2403. + #ifndef amigados
  2404.     if (flag_print_mem)
  2405.       {
  2406. ***************
  2407. *** 3947,3950 ****
  2408. --- 3954,3958 ----
  2409.   #endif /* not USG */
  2410.       }
  2411. + #endif /* not amigados */
  2412.   #endif /* not VMS */
  2413.   #endif /* not OS2 */
  2414. *** gcc-2.6.0/loop.c.~1~    Thu Jun 30 01:20:36 1994
  2415. --- gcc-2.6.0-amiga/loop.c    Sun Jul 17 00:55:27 1994
  2416. ***************
  2417. *** 1791,1798 ****
  2418.                     /* Because the USAGE information potentially
  2419.                        contains objects other than hard registers
  2420.                        we need to copy it.  */
  2421. !                   CALL_INSN_FUNCTION_USAGE (i1) =
  2422. !                     copy_rtx (CALL_INSN_FUNCTION_USAGE (temp));
  2423.                   }
  2424.                     else
  2425.                   i1 = emit_insn_before (body, loop_start);
  2426. --- 1791,1799 ----
  2427.                     /* Because the USAGE information potentially
  2428.                        contains objects other than hard registers
  2429.                        we need to copy it.  */
  2430. !                   if (CALL_INSN_FUNCTION_USAGE (temp))
  2431. !                     CALL_INSN_FUNCTION_USAGE (i1) =
  2432. !                       copy_rtx (CALL_INSN_FUNCTION_USAGE (temp));
  2433.                   }
  2434.                     else
  2435.                   i1 = emit_insn_before (body, loop_start);
  2436.  
  2437.